note 27390 added to function.fopen
| From: | php-general at lists dot php dot net | 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