So I have a completely free account and first of all I'm not sure if the free php supports the cURL library. Does it?
I wrote a script for a computer class and it's not working, I get the white screen of death. I've echoed and commented and found that the problem is after I use $ch=curl_init(). Am I doing something wrong?
I wrote a script for a computer class and it's not working, I get the white screen of death. I've echoed and commented and found that the problem is after I use $ch=curl_init(). Am I doing something wrong?
PHP:
$ch = curl_init();
curl_setopt($ch, CURLOPT_VERBOSE, 0);
echo('TEST CURL');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
//curl_setopt($ch, CURLOPT_COOKIEFILE, "mail_to_phone.txt");
//curl_setopt($ch, CURLOPT_COOKIEJAR, "mail_to_phone.txt");
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$data = array('cell1' => $_SESSION['cell1'], 'cell2' => $_SESSION['cell2'], 'cell3' => $_SESSION['cell3'], 'tos' => 'yes');
curl_setopt($ch, CURLOPT_URL, 'http://mobilecarrierlookup.com/api/exe.asp');
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'cell1=$cell1&cell2=$cell2&cell3=$cell3&tos=yes');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$result1 = curl_exec($ch);
curl_close($ch);