sug15 Posted December 1, 2010 Share Posted December 1, 2010 Let's say I'm requesting a 5 megabyte data file with cURL. I want to echo it for the user as it gets downloaded with cURL. Is there any way to do this? I'm also just using cURL as an example, it could be file_get_contents(), or something else as well. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/220410-echo-a-data-as-it-loads/ Share on other sites More sharing options...
sug15 Posted December 2, 2010 Author Share Posted December 2, 2010 Bump. Quote Link to comment https://forums.phpfreaks.com/topic/220410-echo-a-data-as-it-loads/#findComment-1142079 Share on other sites More sharing options...
trq Posted December 2, 2010 Share Posted December 2, 2010 Http doesn't work like that. All headers + content needs to be sent in one go. You can try playing around with output buffering (see ob_flush) but at best it will be unreliable. Quote Link to comment https://forums.phpfreaks.com/topic/220410-echo-a-data-as-it-loads/#findComment-1142082 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.