note 59952 added to function.file-get-contents

From: Date: Wed, 21 Dec 2005 04:01:41 +0000
Subject: note 59952 added to function.file-get-contents
Groups: php.notes 
Request: Send a blank email to php-notes+get-100499@lists.php.net to get a copy of this message
(not sure how code pastes will come through; sorry if there's markup i don't yet know) what i wish for was a wikified part of this php.net function explanation page. i wish there was a cozy little part between the official man page and the posts of the masses. even just a prominent link to a wikibook page somewhere on wikicities or something. i further wish that i could both ask and help flesh out how timeouts and their resulting implications on results returned to users of the functions 'file-get-contents' could be handled, especially vis-a-vis matters in the realm of TRUTH & falsehood (or perhaps better typed, integration with areas more simple, or indeed even simply structural). which is to say, is there more detail anywhere on how to handle "Warning: file_get_contents(http://www.somedon.net) [function.file-get-contents]: failed to open stream: HTTP request failed! àí—Èq§qh.¥qÿÿÿÿf,¥qg.«q in" ? :)phpe for ( $pagecontents= file_get_contents("http://www.somdom.com/wha_ever") ; $pagecontents==FALSE; sleep($wait+1) # not needed perhaps, but: pause increasingly before next call so as not not to hammer server?) { echo "<BR> Timeout on $line. Waiting $wait and retrying. Time: " . time() . "<BR>"; flush(); ob_flush(); } #echo "<BR> Out of loop."; died and didn't increment, nor tell me what i needed to know, though at least now i see i need to add an Equal sign if i want that plus to multiply. $wait+=1 = good enough for now. ---- Manual Page -- http://www.php.net/manual/en/function.file-get-contents.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+59952 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59952&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59952&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59952&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59952&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59952&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59952&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59952&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+59952&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#100499) next »