Loading...

Professional-PHP@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

[Pro. PHP Dev.] Re: Question about CURL zorro Sat Feb 04 05:00:14 2012

    : Operation timed out after 10000 milliseconds with 0 bytes received
    in on line

    Any ideas?


Yes. You set the curl timeout at 10 seconds, and by then, the response from 
the remote server had not yet arrived completely. In this case, you 
received 0 bytes.

There might've be an error on the server, but I would assume that the 
server script completed, and I would not repost the same information. 
Verifying with an API call if the information exists is a good thing to try.

Suggestion: increase the timeout to 20 seconds during testing (or more if 
needed), until you get the expected response. 

And you can get more debug data inside curl_post() using these:

1) Set CURLOPT_HEADER to 1 and print out $result (the headers will be a the 
top)

2)
$array = curl_getinfo($ch); 
echo '<pre>'.print_r($array, 1).'</pre>';

-- 
This group is managed and maintained by the development staff at 360 PSG. An 
enterprise application development company utilizing open-source technologies 
for todays small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the Google Groups 
"Professional PHP Developers" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Professional-PHP