Page 1 of 1

multiple file download for client?

Posted: Mon Jan 26, 2009 4:43 pm
by allasso
Hello,

I have done much searching and experimenting for the answer to this, but to no avail. I thought I would turn to the forums.

I would like for to be able to allow a client have the option to download multiple files as attachments with one request, eg, the client clicks a link on a page, or submit button, and several file download dialog boxes appear.

I have tried,

<?php

$type_ = EZ_ ;

header('Content-type: text/html');
header("Content-Disposition: attachment; filename=file_$type_.html");
readfile("file_$type_.html");

$type_ = prod_ ;

header('Content-type: text/html');
header("Content-Disposition: attachment; filename=file_$type_.html");
readfile("file_$type_.html");

?>

but it only does the first request.

I have tried many other things as well. Any ideas?

Thank you, Allasso

Re: multiple file download for client?

Posted: Sun Feb 01, 2009 3:17 am
by jaoudestudios
I dont think it is possible. This is a security feature by the browsers.

Zip everything together then get the user to download the zip file that contains the multiple files.