How can I change the php curl timeout when curl attempts to resolve host (curl err_no 6)
Well you've got 3 timeouts on your hands there.
- CURLOPT_TIMEOUT - how long theentire operation is taking
- CURLOPT_CONNECTTIMEOUT - how longcURL waits for the host to respondto its request
- DNS Lookup Timeout -what you are experiencing, the DNSquery fails and takes a certain timeto do this
cURL in PHP does not have a default method for setting this timeout, I would suggest resolving the hostname using another method with a timeout, and then passing the IP to cURL.