开发者

Setting TimeOut in CURL using PHP

开发者 https://www.devze.com 2023-04-12 04:43 出处:网络
I\'ve searched a lot about setting time out for curl request in PHP, but none seems to be helpful. I\'m using CURL-7.15.5 version. I\'m trying to set time-out for a request in milliseconds. I know tha

I've searched a lot about setting time out for curl request in PHP, but none seems to be helpful. I'm using CURL-7.15.5 version. I'm trying to set time-out for a request in milliseconds. I know that in curl-7.16.* there is new option CURLOPT_TIMEOUT_MS, which can set time out in milliseconds. Is there any way to user CURLOPT_TIMEOUT (7.15.5 style) to setup time-out less than a minute?

Any pointers will be appreciated.

Edi开发者_运维百科t: Is it possible to set timeout in milliseconds in curl 7.15.5 version?


Check this links

CURLOPT_TIMEOUT - defines the amount of time that any cURL function is allowed to take to execute.

CURLOPT_CONNECTTIMEOUT - defines the maximum amount of time to wait for the connection to complete

0

精彩评论

暂无评论...
验证码 换一张
取 消