files compression

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vistas
Forum Newbie
Posts: 2
Joined: Thu Aug 04, 2005 2:54 am

files compression

Post 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
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

Search the web, there are already pre-written classes allowing you to zip things

Also:http://us3.php.net/zip
vistas
Forum Newbie
Posts: 2
Joined: Thu Aug 04, 2005 2:54 am

Post 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.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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..
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

there's a zip class in the code snippets too..
Post Reply