You are here: Problem Using cURL « All PHP « IT news, forums, messages
Problem Using cURL

Posted by rh1200la on 02/22/07 01:29

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация