Send real-time php script status to web browser
Posted: Wed Jan 04, 2006 10:10 am
Hi,
I'd like to find a simple way to follow execution of a php script in "real time".
Actually, when I call a php script from a web page, the script is executed by the server, and the result of the script is displayed at the end of its execution (by the mean of "print" statements).
I'm working on big scripts taking a lot of time.
I would like to output some information to the web browser before reaching the end of the script, and if possible update information in "real-time", from the start of the script to the end of the script.
What is the correct mean to achieve this ?
Is there a simple mean to do that, playing with HTML headers (Flush()) ?
I'd like to find a simple way to follow execution of a php script in "real time".
Actually, when I call a php script from a web page, the script is executed by the server, and the result of the script is displayed at the end of its execution (by the mean of "print" statements).
I'm working on big scripts taking a lot of time.
I would like to output some information to the web browser before reaching the end of the script, and if possible update information in "real-time", from the start of the script to the end of the script.
What is the correct mean to achieve this ?
Is there a simple mean to do that, playing with HTML headers (Flush()) ?