Skip to content

Instantly share code, notes, and snippets.

@FernE97
Created February 7, 2014 22:20
Show Gist options
  • Save FernE97/8873182 to your computer and use it in GitHub Desktop.
Save FernE97/8873182 to your computer and use it in GitHub Desktop.
Extract zip files from server
<?php
if ( $_GET['file'] ) {
exec( 'unzip '.$_GET['file'] );
}
else {
echo 'Please pass the filename you would like to extract. ex: '.$_SERVER['SCRIPT_URL'].'?file=content.zip';
}
// www.example.com/tgz_extractor.php?file=content.tgz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment