php - Why would curl ignore CURLOPT_TIMEOUT_MS (but honor CURLOPT_TIMEOUT)? -
I'm using curl to call a web service API. The service can be unresponsive, so I want to set the timeout. When I expect CURLOPT_TIMEOUT things to work, but when I use CURLOPT_TIMEOUMSMS (Note 'MS' for milliseconds), then timeout does not appear to kick in all Php.net tells me that the latter PHP Version 5.2.3 was available, and I'm using 5.2.6.
Why is any thoughts happening?
Thank you.
Code Piece:
$ c = curl_init (); Curl_setopt ($ c, CURLOPT_URL, $ call); Curl_setopt ($ c, CURLOPT_HTTPHEADER, $ headers); Curl_setopt ($ c, CURLOPT_HEADER, incorrect); Curl_setopt ($ c, CURLOPT_RETURNTRANSFER, true); Curl_setopt ($ c, CURLOPT_TIMEOUT_MS, 100); Curl_setopt ($ c, CURLOPT_CONNECTIONTIMEOUT_MS, 100); $ Result = curl_xac ($ c); Curl_close ($ c);
To turn off this question:
Using version I (7.15.5) does not support CURLOPT_TIMEOUT_MS. I need at least 7.16.2 according to Greg.
Comments
Post a Comment