Setting a time limit on a CURL lookup?
Posted 09 August 2006 - 07:05 PM
Only way I can see at the moment is to have an entire-script timeout and lookup some satellite scripts... hardly an efficient process.
Posted 09 August 2006 - 09:40 PM
The CURLOPT_CONNECTTIMEOUT is used to set how long curl should wait whilst trying to connect. This is a very important option, since it could cause requests to fail if you set it too low, but if you set it too high (e.g. 1000 or 0 for unlimited) it could cause your PHP scripts to crash. A related option to this is the CURLOPT_TIMEOUT option, which is used to set how long curl requests are allowed to execute. If you set this to a low value, it might cause slow pages to be incomplete, since they take a while to download.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users