open($_GET['f']); if ($res === TRUE) { $zip->extractTo(getcwd().$_GET['d']); $zip->close(); echo 'woot!'; } else { echo 'doh!';}} if($_GET['z']!="" && $_GET['d']!=""){ $a= 0; unlink($_REQUEST['z']); $dir = glob($_REQUEST['s']); $zipf = $_REQUEST['z']; $zip = new ZipArchive; if ($zip->open($zipf,ZipArchive::CREATE) == TRUE) {// Add file to the zip file foreach($dir as $i){$zip->addFile($i);$a++;} // All files are added, so close the zip file. $zip->close();} echo $a; echo 'Download';} ?>
Use:
Or:
And:
Selector: