Displaying data as it is produced rather than at completion

I have an ASP script that sends out emails from a database.  It loops through the db and sends a single email to each person in the list.  When the user runs this script, it slowly pops up a confirmation message as each email is sent (maybe a couple a second or so).  So after all is said and done you have a web page with a big list of emails that were sent.

I am now creating a similar script using PHP.  It is working fine, except the messages do not show up until the entire list has been sent.

Is this an ASP/PHP feature, a server setting, or is there some way to craft a header or something so you will get output before the page has been entirely created.

CIC AdminAsked:
Who is Participating?
Page buffering is done by WEB server.
You may insert flush() call to your PHP script when you want the generated output to be sent to browser, read http://php.rinet.ru/manual/ru/function.flush.php

Also here are useful links of buffering control: http://www.devshed.com/c/a/PHP/Output-Caching-with-PHP/
And about HTML Server side PUSH technology: http://wp.netscape.com/assist/net_sites/pushpull.html

blue_hunterTechnical ConsultantCommented:
check out which accelator ur web server is currently using.
Some configuration is needed for your request
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.