Page 1 of 1

Equivalent of DoEvents

Posted: Fri Jun 03, 2005 8:43 am
by Kizman
Hi,

I am wondering if there is an equivalent of DoEvents in PHP.

Indeed I have to wait for the end of execution before something is displayed on my browser, which is not nice especially if I want to troubleshoot...

Thanx for your help.

Wongy

Posted: Fri Jun 03, 2005 9:32 am
by Syranide
ob_flush (um and flush I think)

however, it is not guaranteed to work as the server could be buffering and so on... it works on some systems, some not.

(btw, what's the problem with trouble shooting and that, I really don't understand? something hangs?)

Posted: Fri Jun 03, 2005 9:41 am
by Kizman
Actually, I have a list of IP addresses that I submit to the script.

For each of them, it has to execute : nbtstat -A IP_Address. It has to display the result after each execution. But for some of the IP addresses, it just hangs, and I do not see any result.

(this is also linked to my other question: time limit)

Posted: Fri Jun 03, 2005 10:14 am
by Syranide
as I said, flush or ob_flush, or just create an outputbufferer that logs to a file, which you can read at anytime (or if you are on linux watch it realtime)

Posted: Fri Jun 03, 2005 10:19 am
by Kizman
flush() and ob_flush() work great!

Thanx.

(I still have the timer issue, but that's another story)