Add password on Zip via PHP

i tried this suggestion: http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_22848474.html

But, it didn't worked. What should i try :/
springfreshAsked:
Who is Participating?
 
hernst42Connect With a Mentor Commented:
don't know a about a free version. I use seven zip, but can't find the link
0
 
hernst42Commented:
what does not work with that solution?
which OS is the webserver running?
0
 
springfreshAuthor Commented:
i am running on windows. I i am installed WAMP server on windows VISTA
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
hernst42Commented:
zip must be in the PATH and the webserver must be able to write to the directory where WAMP is running.
Check your permissions and pathes.
0
 
springfreshAuthor Commented:
well, i am doing like that:
And it creates .zip file, but do not add password :/
$zip = new ZipArchive();
$filename = $username.'-'.$date.'-'.$random.'.zip';
 
if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE) {
}
 
$zip->addFromString($date."-textfile.txt", "Works!\n");
echo system('zip -P bla '.$filename);
$zip->close();

Open in new window

0
 
springfreshAuthor Commented:
hm, aha i see now, that i need zip.exe in that dir. But where can i download free version. I tried from http://www.info-zip.org/Zip.html#Win32 . But i dont know which one should i download. I am using windows Vista
0
 
springfreshAuthor Commented:
thanks, worked!
0
All Courses

From novice to tech pro — start learning today.