Timeouts

As with cURL, pecl_http has options for handling timeouts.

The 'timeout’ request option, which corresponds to CURLOPT_TIMEOUT, is the maximum number of seconds an entire request may take before timing out.

Likewise the 'connecttimeout’ request option, the counterpart for CURLOPT_CONNECTTIMEOUT, is the maximum number of seconds that a connection attempt, which includes DNS resolution, may take.

Finally the 'dns_cache_timeout’ request option, which is equivalent to CURLOPT_DNS_CACHE_TIMEOUT, is the maximum number of seconds that a DNS cache entry will be retained and defaults to 120 seconds (two minutes).


© pecl_http PECL Extension — Web Scraping

>>> Back to TABLE OF CONTENTS <<<
Category: Article | Added by: Marsipan (31.08.2014)
Views: 403 | Rating: 0.0/0
Total comments: 0
avatar