<?php
	$source = $_SERVER["ZIP_SOURCE"];
	$destination = $_SERVER["ZIP_DESTINATION"];
	$entries = json_decode($_SERVER["ZIP_ENTRIES"]);	
	
	$zip = new ZipArchive;
	$res = $zip->open($source);
	
	if ($res === TRUE) 
	{
		if($entries == '')
			echo $zip->extractTo($destination);
		else
			echo $zip->extractTo($destination,$entries);			
		$zip->close();
	}