PHP Code:
<?php
// Function to Unzip
function UnZip(){
global $controller;
$zip = new ZipArchive;
$res = $zip->open('modules/'.$controller->GetControllerRequest('URL', 'module').'/apps/filename.zip');
if ($res === TRUE) {
$zip->extractTo('etc/apps/chive');
$zip->close();
return true;
} else {
return false;
}
}
// Un-Compressing The ZIP Archive
if (UnZip() == 'true'){
echo "Unzip was successful";
// do something else?
} else {
echo "Unzip was not successful";
// exit or retry?
}
?>
Ripped this out of Sentastico, untested for your use.