Sending Partial Pages?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'd like to make a page with a sort of check list as it works.

I.e. CHECKING FOR FILE... SUCCESS then a few seconds later it sends

But since PHP is server-side pause() wouldn't work... it only delays
the script from assembling the page before it sends it to the browser.
Can I send pieces at a time so I can get this sort of checklist effect
instead of waiting 20 seconds for it all to appear at once?

I'm thinking it's not possible, but I'm by no means a php expert.


Re: Sending Partial Pages?

You could use sleep() in conjunction with flush() and ob_flush() to
force the output to be sent to the browser before waiting.

Re: Sending Partial Pages?

I'll give that a shot, thanks!

Re: Sending Partial Pages?

Works perfectly, exactly what I wanted, thanks!

Re: Sending Partial Pages?


Quoted text here. Click to load it

Why do you want to use a pause() function (actually sleep())?
I think the script should be executed as fast as possible.
If your script is slow you may use this sequence to flush everything:


Using only flush() which seems (without trying) sufficient does not work  
(when I tried it).

Hero Wanders

Re: Sending Partial Pages?

I don't really want to use sleep() (DOH! it is sleep), I was just sort
of using it as an example.

Thanks for the help

Site Timeline