note 49836 added to function.clearstatcache

From: Date: Thu, 10 Feb 2005 02:02:50 +0000
Subject: note 49836 added to function.clearstatcache
Groups: php.notes 
Request: Send a blank email to php-notes+get-84754@lists.php.net to get a copy of this message
This function also applies under circumstances where fsockopen() is used. I tried to make a small loop that retries to connect a certain number of times before giving up, and it simply skipped over the retry connections and passed them as failures. Adding clearstatcache() between each retry did the trick. This will NOT retry connecting after the first failure: do { $connection=fsockopen("some_host_or_ip"); } while (!$connection); This will retry connecting after each failure: do { $connection=fsockopen("somewebsite"); clearstatcache(); } while (!$connection); ---- Manual Page -- http://www.php.net/manual/en/function.clearstatcache.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49836 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49836&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49836&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49836&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49836&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49836&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49836&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84754) next »