"Check out passthru"
I looked at the passthru() command and tried it out, and it does nothing...?
passthru("c:/winzip -e -sPassword pathToZipFile extractTo",$ret)
Just returns a 1. And the zip file is executed as usual.
I also found popen (http://se.php.net/manual/en/function.popen.php) and proc_open() (http://se.php.net/manual/en/function.proc-open.php)
It feels like I need one them. Something like: while opening the file executing a external program. However I can't find anything in the manual that indicates the use of an external program.
These functions are a headache, I have zero experience with command line and shell, exec, and stuff like that, so all this is very hard for me.
"Check out http://us2.php.net/zip"
I have been using php 5.2 zip support, and while it's great and all, it does not support password functions, so I used the exec command to pass-protect the files.
"You could also use system to extract the file to a temporary location, then fopen to download the file."
The problem with that is: the file is big, and if the user wants to have a look at one file in the archive then the entire archive have to be extracted and stuff; I need to stream.
In other words, I need to get the fopen to run the system/exec function.. Or something like that...