# Flash and PHP -\> Flush

**URL:** <https://forum.kirupa.com/t/flash-and-php-flush/189628>\
**Category:** Uncategorized\
**Created:** [June 4, 2006, 8:01pm UTC](https://forum.kirupa.com/t/flash-and-php-flush/189628 "2006-06-04T20:01:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cholin](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@cholin](https://forum.kirupa.com/u/cholin)\
**Post date:** [June 4, 2006, 8:01pm UTC](https://forum.kirupa.com/t/flash-and-php-flush/189628/1 "2006-06-04T20:01:30Z")

</div>

This is a Flash question because the PHP part is fine. Anyways, PHP has a function that allows it to ouput data to the browser at any time, as you can see with this example:

[http://www.nilok.ca/test/flushtest.php](http://www.nilok.ca/test/flushtest.php)

All that script is, is a simple echo followed by a flush so that the data is put out when I say, not all at once when the script is finally parsed. Now the question is, how can I get flash to read this? I want to be able to have flash read the new data off the page every 4 seconds or so, and parse it quietly, then go back 4 seconds later looking for new stuff.

Any ideas? Any sort of loadVars will not work because they all wait for the page to stop loading. Do I need a special socket thing or what?
