Page 1 of 1

downloading multiple files by adding them to a zip

Posted: Fri Feb 06, 2004 6:14 pm
by Burrito
I have a select box that allows multple selects of file names. When that form is submitted, I'd like to zip up all of the files selected and then have it download to the end user.

The part I'm having trouble with is creating this zip file. I looked here:

http://www.zend.com/zend/spotlight/crea ... files1.php but that didn't provide enough info for me.

can anyone shed some light or perhaps share some code?

thx,

burr

Posted: Fri Feb 06, 2004 6:22 pm
by mikusan
The easy way, is to use the PHP function gzcompress: http://ca2.php.net/manual/en/function.gzcompress.php

I believe, gzip is essentially the same as .zip files and all windows users will be able to read them.

Now this is the super lazy fast way :)