Code Snippets Php

include('pclzip.lib.php');
//zip file to extract
$archive = new PclZip('printerport1.zip');
//extract to a folder called newdir
if ($archive->extract(PCLZIP_OPT_PATH, 'newdir') == 0)
{
//failed
die("Error : ".$archive->errorInfo(true));
}
echo "Successfully extracted files;
?>