Fw: PHP script needs to timeout upon FOPEN to URL
Phil Powell
soazine at erols.com
Fri Dec 13 18:13:55 EST 2002
----- Original Message -----
From: "soazine at pop.erols.com" <soazine at pop.mail.rcn.net>
To: <soazine at erols.com>
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/ .
More information about the talk
mailing list