note 82870 added to function.stream-get-contents

From: Date: Tue, 29 Apr 2008 23:28:55 +0000
Subject: note 82870 added to function.stream-get-contents
Groups: php.notes 
Request: Send a blank email to php-notes+get-138921@lists.php.net to get a copy of this message
some times this functions cause an max execution time time error, Why? Simple, if you use it the function wait for have the specified byte length into the resource or the end of file, but, several times this not happend, so we need implement an artificial flag like this: $tmp = stream_get_contents($this->socket, 42); while($tmp[42] != 'N'){ //Your code... $tmp = stream_get_contents($this->socket, 42); } ---- Server IP: 148.206.80.9 Probable Submitter: 148.233.165.183 ---- Manual Page -- http://www.php.net/manual/en/function.stream-get-contents.php Edit -- https://master.php.net/note/edit/82870 Del: integrated -- https://master.php.net/note/delete/82870/integrated Del: useless -- https://master.php.net/note/delete/82870/useless Del: bad code -- https://master.php.net/note/delete/82870/bad+code Del: spam -- https://master.php.net/note/delete/82870/spam Del: non-english -- https://master.php.net/note/delete/82870/non-english Del: in docs -- https://master.php.net/note/delete/82870/in+docs Del: other reasons-- https://master.php.net/note/delete/82870 Reject -- https://master.php.net/note/reject/82870 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#138921) next »