...

View Full Version : active, online zipping or rar'ing.



thesavior
12-28-2005, 08:34 PM
i want to upload something through a form, and have the script do some sort of compression file, like:

.zip
.rar
.tar.gz

etc...

if it makes any difference, it is a unix machine.

devinemke
12-28-2005, 09:57 PM
PHP itself cannot do the compression but you can use PHP to execute any command line program you want using the Program Execution Functions (http://www.php.net/manual/en/ref.exec.php). you just need to call the excutable to whatever compression app you are using with the required command line switches/arguments.

thesavior
12-29-2005, 02:35 AM
can i get an example how to use it for my purposes?

like how do i convert the .exe for something like winrar into unix to get it to work.

devinemke
12-29-2005, 03:00 AM
you need to have the command line executable to whatever program you wish to use somewhere on your server and then feed that path to exec (http://www.php.net/exec) with whatever command line arguments your program expects to see.

marek_mar
12-29-2005, 03:23 AM
http://pear.php.net/package/File_Archive



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum