I'm working a PHP script to extract password protected zip files,
My script normally works on unprotected files, but when i use password protected files "version to extract 2.0" or high those files not extracting.
My Code
$zip = new ZipArchive();
if ($zip->open('files2.zip') === true) {
$zip->setPassword('4e1414144o');
$fg= $zip->extractTo('/var/www/vhosts/xxxx/xxxx/xxx/xxx/xxx/unzipped/');
$zip->close();
var_dump($fg);
// this return true if extract ok
}
We can get 1.0 by select "Zip legacy encrption" when i set password using that extract works fine
The file i'm going to extract are automatically generated ones an receiving via email. so i haen't control over it's version or legacy mode,
can someone know how to extract that kind of files using PHP or is there other way, Thanks a lot