Page 1 of 1

files compression

Posted: Thu Aug 04, 2005 3:24 am
by vistas
Hi,

I need to create a following script:

Periodically I create a few files (5-10) on the server via php. I need to allow the user to download them altogether. As far as I see it, the only way it can be done is by compressing all files in one file and displaying it to the user, so he can download it. How can I create a zip (zip or gzip) file that will compress many files at once?
Thank in advance

Posted: Thu Aug 04, 2005 3:41 am
by josh
Search the web, there are already pre-written classes allowing you to zip things

Also:http://us3.php.net/zip

Posted: Thu Aug 04, 2005 3:54 am
by vistas
I've seen this link, and it doesn't help. It regards only the "Read Only Access" whick doesn't enable creating a new zip file. And the other Zlib php library doesn't tell you how to create a zip file that contains many files.

Posted: Thu Aug 04, 2005 4:56 am
by timvw
This does not belong in General Discussion...

Your script Shouldn't need write access, as it should be able to output everything immediately to the user..

Posted: Thu Aug 04, 2005 7:08 am
by feyd
there's a zip class in the code snippets too..