note 59952 deleted from function.file-get-contents by nlopess

From: Date: Tue, 28 Feb 2006 12:25:00 +0000
Subject: note 59952 deleted from function.file-get-contents by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-104556@lists.php.net to get a copy of this message
Note Submitter: phpemail at supernaut dot org ---- (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.

« previous php.notes (#104556) next »