Problem Using cURL

Hey all, can someone here troubleshoot this piece of code. I'm using
a Linux webhost with cUrl enabled (verified through phpinfo and their
control panel - www.aplus.net).

I'm getting nothing back as a result. My $postUrl is a simple page
that returns a true or false string. I've tested the url to hit an
RSS feed as well and I get nothing back and no errors whatsoever.

Thanks.


$curlHandle = curl_init(); // init curl
curl_setopt($curlHandle, CURLOPT_URL, $postUrl);
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curlHandle); // Make the call for sending
curl_close($curlHandle); // Close the

echo 'result = '.$result;
die();
rh1200la [ Do, 22 Februar 2007 02:29 ] [ ID #1638204 ]

Re: Problem Using cURL

> Hey all, can someone here troubleshoot this piece of code. I'm using
> a Linux webhost with cUrl enabled (verified through phpinfo and their
> control panel - www.aplus.net).
>
> I'm getting nothing back as a result. My $postUrl is a simple page
> that returns a true or false string. I've tested the url to hit an
> RSS feed as well and I get nothing back and no errors whatsoever.


Just tried the code myself as is and it worked 100%.
Peter [ Fr, 23 Februar 2007 04:21 ] [ ID #1638214 ]
PHP » alt.php » Problem Using cURL

Vorheriges Thema: Looping through array
Nächstes Thema: PHP Open XML