| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curl-and-php mailing list Archives
curl_exec() dies intermittently
From: Richard Draucker <rd_at_traceli.com>
Date: Thu, 6 Sep 2007 08:57:59 -0500
My application repeatedly requests pages from a given site. Some sites work just fine. Others, however, intermittently hang while executing curl_exec().
The code...
$ch = curl_init();
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
// IMITATE CLASSIC BROWSER BEHAVIOR
// HANDLE SSL CONNECTION
// RETRIEVE TARGET PAGE
if(curl_error($ch) !== ''){
curl_close($ch);
return $html;
Server Info: CentOS with PHP 5.2.0 on a VPS
Any suggestions as to how to prevent curl_exec() from hanging or how to make CURLOPT_TIMEOUT force a return after the specified time period?
Thanks,
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info