php curl return downloaded content to user while file is still downloading -


i want server begins download big file. while file downloading output file content user. tried code:

$ch = curl_init($url); curl_setopt($ch, curlopt_timeout, 155000); curl_setopt($ch, curlopt_followlocation, true); $response = curl_exec($ch); // curl response echo $response; 

but code takes long time. want use curl instead of readfile.

see answer: manipulate string 30 million characters long

modifing mystream class should change enough can echo results browser. assuming browser downloading file, should keep downloading it.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -