We help IT Professionals succeed at work.

Displaying data as it is produced rather than at completion

CIC Admin
CIC Admin asked
on
Medium Priority
236 Views
Last Modified: 2008-03-17
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.

Thanks.
Comment
Watch Question

system administrator
Top Expert 2007
Commented:
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
blue_hunterTechnical Lead
CERTIFIED EXPERT

Commented:
check out which accelator ur web server is currently using.
Some configuration is needed for your request
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.