function GetDatacURL($submiturl, &$arrData)
{
if (is_array($arrData))
$postdata = http_build_query($arrData); //for fucking PHP 5
$ch = curl_init(); /// initialize a cURL session
curl_setopt($ch, CURLOPT_URL, $submiturl); //live server
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//Un comment the next line to write the response to the rates and services request to a file.
//curl_setopt ($ch, CURLOPT_FILE, $fp);
$data = curl_exec($ch);
if (curl_errno($ch)) {
return curl_error($ch);
} else
return $data;
curl_close($ch);
}// END function GetDatacURL($submiturl)
$Array = array("Type" => "marketing", "URL" => str_replace("www.", "", $_SERVER['SERVER_NAME']));
echo GetDatacURL("http://highpeaksbyway.com/nyroutesSharedFiles/linksServer.php", $Array);
?>