El-Vino
11-14-2006, 04:54 AM
Hi everyone...
I have a maintenance and cache generating php script that take quite a while to complete and I got to wishing it would show where it stands on a real time basis. It already output progress log like "generation of these pages .... Done" kinda line. Problem is with PHP, you get to wait until the page (and so, the script) is complete before showing anything... so you get the whole report, but only at the end.
I did some thinking and thought that I could make the script into a shell script to be executed in the background, called with shell_exec(), outputing a text file and on the web, creating a page that refreshes every second and that would load that text file, effectively showing where the maintenance stands... but that seems like overkill to do it like this, right ?
Is there a better way to do this ? a easy way ? anyone, any insight ?
keep in mind I cannot have it use any client-side technology like JAVA.
Thanks all!
I have a maintenance and cache generating php script that take quite a while to complete and I got to wishing it would show where it stands on a real time basis. It already output progress log like "generation of these pages .... Done" kinda line. Problem is with PHP, you get to wait until the page (and so, the script) is complete before showing anything... so you get the whole report, but only at the end.
I did some thinking and thought that I could make the script into a shell script to be executed in the background, called with shell_exec(), outputing a text file and on the web, creating a page that refreshes every second and that would load that text file, effectively showing where the maintenance stands... but that seems like overkill to do it like this, right ?
Is there a better way to do this ? a easy way ? anyone, any insight ?
keep in mind I cannot have it use any client-side technology like JAVA.
Thanks all!
