SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Addict mickmel's Avatar
    Join Date
    Feb 2001
    Location
    Marietta, GA
    Posts
    274
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to echo output as it's happening?

    I'd like to be able to have my browser display the output of my script as it's happening. However, it seems to cache it for a while and either show it in huge chunks or all at once when it's done.

    A few examples:
    - For those that use vBulletin, while you're running an update it'll say something like "Updating xxxx table..." and then a few seconds later it'll say "complete". A similar script of mine would not say anthing until it was done and then say "Updating xxxx table.... complete" all at once.
    - For a more easy to see example, check out this page. Enter any URL in the big box on the left and then click "Check Link Popularity" on the right. The script will show it's progress as it's going along.

    When I write similar scripts, I have the script "echo" out the data as it's being completed, but the browser won't show it for a while. It's not a problem with my browser, as both of the above examples work as I said, and I've used both IE and FireFox.

    Any suggestions?

    Thanks,
    Mickey
    MickMel.com - My portfolio, etc.
    @mickmel - Twitter
    Google Earth Hacks - Fun stuff for Google Earth.

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2004
    Location
    dublin, Ireland
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    google for output buffering

    maybe a javascript is used to refresh the page while it's doing work inthe background.

    I came across some articles about this a long time ago, sorry I'm not much help.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2004
    Location
    South Africa
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could also look into XMLHTTPRequest for making requests to the server without reloading your page. Its JavaScript though...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •