note 106284 deleted from function.connection-status by danbrown

From: Date: Mon, 24 Oct 2011 22:54:21 +0000
Subject: note 106284 deleted from function.connection-status by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-184114@lists.php.net to get a copy of this message
Note Submitter: thang ---- 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.

« previous php.notes (#184114) next »