Re: Set a timeout on file_get_contents?

From: Date: Tue, 15 Feb 2005 16:15:00 +0000
Subject: Re: Set a timeout on file_get_contents?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-208741@lists.php.net to get a copy of this message
Brian Dunning wrote:
Is there any way to specify a timeout on a file_get_contents()? I'm trying to verify a URL but I don't want to spend more than a few seconds on it. - Brian
Note that using file_get_contents to do this is only going to work if your php.ini has allow_url_fopen = 1. Actually I think we just discussed a solution last week that would work for you. -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-general&w=2 STFM | http://www.php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.general (#208741) next »