I have a script that runs on 4 other servers that I have installed it on (for processing credit cards via authnet).
but this one particular server won't do it. All it does is show a blank screen with no errors when calling the curl function.
here's an example that works on the server so I know that curl is installed:
<?
$data = "http://www.google.com";
$data = ereg_replace(" ", "%20", $data);
$ch = curl_init($data);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$fetch_result = curl_exec($ch);
echo $fetch_result;
$fetch_result = split(",", $fetch_result);
echo $fetch_result;
curl_close($ch);
?>
but then this script does not work:
$data = processor($x_First_Name, $x_Last_Name, $x_Address, $x_City, $x_State, $x_Zip, $x_Country, $shipaddress, $shipcity, $shipstate, $shipzip, $shipcountry, $phone, $fax, $email, $total, $x_Card_Num, $x_Exp_Date, $orderNumberNow, $orderNumber);
$data= "https://secure.authorize.net/gateway/transact.dll?$data";
$data = ereg_replace(" ", "%20", $data);
$ch = curl_init($data);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$fetch_result = curl_exec($ch);
curl_close($ch);
$data = ereg_replace(" ", "%20", $data);
$ch = curl_init($data);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$fetch_result = curl_exec($ch);
curl_close($ch);
would this be because php might installed as a module instead of a cgi? Is there a way to rewrite the above script so that it would work?
Thanks. Again, yes the script will work as it works on 4 other servers.