----- Original Message ----- 
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 5:13 PM
Subject: PHP script needs to timeout upon FOPEN to URL


I have the following line:

while (!($file = @fopen("http://www.myurl.com";, "r")) && time() <
$startTime + $time);
if (!$file){
 echo "Timed out, try again later";
} else {
 // do stuff
}

Problem is, when it attempts to connect to the remote server, it's supposed
to time out after 2-5 seconds, but it doesn't, it just locks up :(  Any
suggestions?

Phil

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to