note 24460 deleted from function.flush by sniper
| From: | sniper@php.net | Date: | Mon, 13 Oct 2003 01:36:00 +0000 |
| Subject: | note 24460 deleted from function.flush by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58460@lists.php.net to get a copy of this message | ||
Note Submitter: Atom@Business-PHP.com
----
Another way to use flush doesn't seem to be documented anywhere:
flush();
flush(passthru("/usr/home/joeblow/shellscript ${argument}"));
This can cause a script that takes a while to run to be flushing as often as it can, and will update
as often as the browser can handle.
I don't know if this works on all systems, because I can't find it documented anywhere.
Here's an example in action:
http://Business-PHP.com/rdns/
Another example also uses the "300 blank spaces" trick, so it should update at every line.
http://business-php.com/rdns/flush
With most browsers, you can scroll down as it creates a list. Without using flush, must browsers
will wait until the page is done before rendering the page.