Skip to content

Instantly share code, notes, and snippets.

View xxxdepy's full-sized avatar

Deepak Kamat xxxdepy

View GitHub Profile
@irazasyed
irazasyed / unzip.php
Created June 26, 2013 18:57
PHP: This code allows you to Unzip a ZIP file
<?php
function unzip($location,$new_location){
if(exec("unzip $location",$arr)){
mkdir($new_location);
for($i = 1;$i< count($arr);$i++){
$file = trim(preg_replace("~inflating: ~","",$arr[$i]));
copy($location."/".$file,$new_location."/".$file);
unlink($location."/".$file);
}
return true;