The first thing you’ll need to do is make sure that the php_zip.dll is enabled in your php.ini file. Then use the following PHP code:
<?php
$zip = zip_open(“myzipfile.zip”);
if(is_resource($zip)) {
while ($zip_entry = zip_read($zip)) {
$fp = fopen(“destination_folder/”.zip_entry_name($zip_entry), “w”);
if (zip_entry_open($zip, $zip_entry, “r”)) {
$buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
fwrite($fp,”$buf”);
zip_entry_close($zip_entry);
fclose($fp);
}
}
zip_close($zip);
}
?>
The code will unzip the file “myzipfile.zip” to the folder “destination_folder”. Remember that the [...]