note 27390 added to function.fopen

From: Date: Wed, 04 Dec 2002 09:40:14 +0000
Subject: note 27390 added to function.fopen
Groups: php.notes 
Request: Send a blank email to php-notes+get-40327@lists.php.net to get a copy of this message
If you're accepting urls from visitors which you fetch data from, note that file() won't timeout if the server is behaving badly. Take this url as an example: http://www.inware.com/justsomeurl When parsing this url, your script will just stay at file() indefinitely until the whole script timeouts. You could use the "hairy" method someone proposed on this page, but it's a bit - well - hairy. Oh what would I give for a timeout parameter in the file() command! *hint* *hint* -- http://www.php.net/manual/en/function.fopen.php http://master.php.net/manage/user-notes.php?action=edit+27390 http://master.php.net/manage/user-notes.php?action=delete+27390 http://master.php.net/manage/user-notes.php?action=reject+27390

« previous php.notes (#40327) next »