ZIP or RAR file support in PHP?
Howdy guys (and gals),
Let's say I have a screenshots archive (which I do ) and I want to upload new screenshots via FTP in ZIP format.
When the ZIP is on the server, is there any way that I can unzip the file through PHP (or CGI for that matter) into a specific directory?
RAR format would be fine too...
Thanks in advance folks,
Maybe you should play with system execution functions
such as exec() or system() to run arch/unarchiving in shell/cmd
PHP has support for Zip read access only, so theorically you could do it with zip.
If you find out you cannot use Zip (not every host compiles PHP with this extension), try Gzip (what I would advise actually).
To produce Gzip files on Windows, you can use the standalone gzip.exe and gunzip.exe functions for DOS/Cygwin (you'll find them easily), or use PowerArchiver which just happens to be like Winzip, only minus the nagging screen and plus tar/gzip/bzip2 support.
Last edited by Michel V; Mar 19, 2002 at