Reputation:
I use cURL library
to get the content of current URL. So I wonder, what is the maximum value for CURLOPT_TIMEOUT option of curl_setopt
function ? I also looked at manual page but found nothing about it. Is it possible to set no time limit to this option?
Thanks in advance.
Upvotes: 4
Views: 5249
Reputation: 25165
It is possible to set no time limit to CURLOPT_TIMEOUT
by simply setting the timeout to 0
.
Do take into account that good programming normally expects the unexpected. So if you want to make sure your code doesn't hang... and you want to wait extra-long, double or triple what you are expecting to be your maximum value but don't leave that thread there hanging eternally if something goes wrong.
Upvotes: 8