Displaying data as it is produced rather than at completion

Posted on 2006-04-03
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.

Question by:CIC Admin
    LVL 27

    Accepted Solution

    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

    Also here are useful links of buffering control:
    And about HTML Server side PUSH technology:

    LVL 9

    Expert Comment

    check out which accelator ur web server is currently using.
    Some configuration is needed for your request

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    Part of the Global Positioning System A geocode ( is the major subset of a GPS coordinate (, the other parts being the altitude and t…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now