• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

ZIP/UNZIP scriprt or program

Subhash

New Member
Can any one suggest me a php based program or package (free) by which i can Zip and Unzip (i.e compession/decompression) folders, files in an webbased environment on my server.
It could be some kind of filemenager program or package in php available for free which supprots compression and decompression methods.
 
Thanks for your effort, but this is just a simple zip extractor to a directory. Files/folders cannot be compressed.
 
^^ PHP needs to be compiled with zip support, and most servers arent; its not default behaviour, I'd go with using tar actually.

There are some classes out there that can achieve data compression but they are more poc than production ready code.
 
well I dont think you can unzip it the way you wish to do it.
I sugest smart ftp and winrar, winrar works great with bot .zip and .rar and .tar and smart ftp is one of the best ftp programs ive ever used.
are you placing the script on a local computer or on a remote one?



cheers
-Ernesto
 
winrar works great with bot .zip and .rar and .tar and smart ftp

You didn't understand what i am saying. I am asking for a script or or program to perform compression/decompression job on the server side. Winran won't work on servers.
 
Here is a class that should help you.

Allows the creation of tar, gzip, bzip2, and zip archives, and the extraction of tar, gzip, and bzip2. Supports relative paths/no paths, comments, and recursing through subdirectories. Can write file to disk, allow user to download directly, or return file contents in a string or an array. Does not require any external programs to run. PHP must be compiled with '--with-zlib' for gzip and zip and '--with-bzip2' for bzip2. Supports creation of self-extracting zip archives. See readme for full details.

http://www.phpclasses.org/browse/package/945/download/zip.html
 
Assuming some sort of linux server, can you just use the zip/unzip utilities, executed via the php "exec" or "system" command?
 
Can you tell me the proper syntax/command for using a tar in exec() for php.

I want all arguments for executing tar to compress/ decompress files.
 
Back
Top