note 30592 added to function.stream-set-timeout

From: Date: Sun, 23 Mar 2003 09:34:14 +0000
Subject: note 30592 added to function.stream-set-timeout
Groups: php.notes 
Request: Send a blank email to php-notes+get-45672@lists.php.net to get a copy of this message
I'm attempting to do this $stdin=fopen("php://stdin","r"); $time=time() stream_set_timeout($stdin,61); $auth=0; while ( ($auth==0 || $auth==1) && time()<$time+60) { while (!feof($stdin) && $auth==0 && time()<$time+60) { $test=fgets($stdin); /* I get stuck here unless i hit enter i never get to my time out */ } } echo "you have timedout\n"; -- http://www.php.net/manual/en/function.stream-set-timeout.php http://master.php.net/manage/user-notes.php?action=edit+30592 http://master.php.net/manage/user-notes.php?action=delete+30592 http://master.php.net/manage/user-notes.php?action=reject+30592

« previous php.notes (#45672) next »