Page 1 of 1

cURL help needed

Posted: Fri May 18, 2007 5:43 pm
by reneeshtk
Hi All

I have written some curl commands for retreving data from a site.
the code of test.php is

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://php.net/");
$test = curl_exec($ch);
echo $test;
curl_close($ch);

This code is working fine in localhost . but not working when I uploaded into the server. There showing a dialogue box telling "you have chosen to open test.php....what should firefox do with this file.. open with or save to disk... etc...

I checked the phpinfo of server and found curl is enabled.. Then why this dialogue box coming and not working the code. what we do to overcome this?

the code is not working in my particular remote server, but works fine in another remote server and the localhost.

the Php version in which my curl working is : PHP Version 5.1.6

Not working version is : PHP Version 4.3.2

Please help..

Thanks in advance........

Posted: Fri May 18, 2007 8:36 pm
by Grim...
It sounds like your server isn't set up to handle PHP files...

Posted: Sat May 19, 2007 3:47 am
by Ollie Saunders
Yeah I would guess PHP is either not there or disabled some how.
How did you get to see the phpinfo()?