Send files using Content-Disposition: attachment in parallel

Posted by Manos Dilaverakis on Stack Overflow See other posts from Stack Overflow or by Manos Dilaverakis
Published on 2010-03-12T13:45:00Z Indexed on 2010/03/12 13:47 UTC
Read the original article Hit count: 385

Filed under:
|

I have a PHP page that sends a file to the browser depending on the request data it receives. getfile.php?get=something sends file A, getfile.php?get=somethingelse sends file B and so on and so forth. This is done like so:

header('Content-Disposition: attachment; filename='. urlencode($filename));
readfile($fileURL);

It works except it can only send one file at a time. Any other files requested are send in linear fashion. One starts as soon as another finishes.

How can I get this to send files in parallel if the user requests another file while one is downloading?

© Stack Overflow or respective owner

Related posts about php

Related posts about http