note 106284 added to function.connection-status

From: Date: Mon, 24 Oct 2011 22:48:43 +0000
Subject: note 106284 added to function.connection-status
Groups: php.notes 
Request: Send a blank email to php-notes+get-184113@lists.php.net to get a copy of this message
Toppi points out something interesting. the following code: while (connection_status()==0) { sleep(1) } would actually NEVER exit. Fine, a minor design flaw. so change it to: while (connection_status()==0) { print " "; flush(); ob_flush(); sleep(1); } this new code exits when the user hits "stop". great! the problem is that it sends a character every second. that is 3.6k/hr. for cellular data, this translates to dollars and cents. i guess this is a problem with cgi?, and can't ever be solved. how unfortunate. ---- Server IP: 69.147.83.197 Probable Submitter: 107.43.232.50 ---- Manual Page -- http://www.php.net/manual/en/function.connection-status.php Edit -- https://master.php.net/note/edit/106284 Del: integrated -- https://master.php.net/note/delete/106284/integrated Del: useless -- https://master.php.net/note/delete/106284/useless Del: bad code -- https://master.php.net/note/delete/106284/bad+code Del: spam -- https://master.php.net/note/delete/106284/spam Del: non-english -- https://master.php.net/note/delete/106284/non-english Del: in docs -- https://master.php.net/note/delete/106284/in+docs Del: other reasons-- https://master.php.net/note/delete/106284 Reject -- https://master.php.net/note/reject/106284 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184113) next »