thinkspill Posted September 28, 2007 Share Posted September 28, 2007 I'm trying to write a script that reads from a URL which, for example's sake, sends data at 5 second intervals. As the server sends each chunk of data I want to echo that data to the page. So far I've only been able to display the data after all of it has been sent, but not as it arrives in the 5 second intervals. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/71113-displaying-transfer-encoding-chunked-data-as-it-arrives/ Share on other sites More sharing options...
btherl Posted September 29, 2007 Share Posted September 29, 2007 Try ob_implicit_flush() and ensure that zlib output compression and mod_gzip are not active on your page. You can check that by checking the headers in your browser (For example, using live http headers extension in firefox) Simply printing at 5 second intervals is not enough, as php will cache the data and send it in larger chunks by default. Quote Link to comment https://forums.phpfreaks.com/topic/71113-displaying-transfer-encoding-chunked-data-as-it-arrives/#findComment-357721 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.