cURL problems

zemsten

New Member
Messages
3
Reaction score
0
Points
0
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?

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);
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
make sure that you are using php level 2. i believe that level 1 has curl disabled.

a sure fire way to check this is using
PHP:
if (!function_exists('curl_init'))
  echo "cURL Support Disabled";
 
Last edited:

zemsten

New Member
Messages
3
Reaction score
0
Points
0
yeah, it looks like it's disabled. damn, i had gotten all the testing done except for the sendmail part on my own local machine, i was going to put it on here to see if it worked. does "level 2" or whatever cost $$$?
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
no, level 2 is free, but i don't know if the script to make it level 2 is enabled yet, due to the new site.
 

zemsten

New Member
Messages
3
Reaction score
0
Points
0
yeah, i couldn't find it. i tried clicking upgrade php and it said "this feature is not enabled." or something like that.
 
Top