nomorekillz Posted December 16, 2015 Share Posted December 16, 2015 (edited) Hey dear community, I started to learn somethings about mysql and php today. Im trying to use a custom url to unzip x file. for example:http://www.Whateverwebsite.com/uploads/unzip.php?file=FILENAMEThe reason of this is because Im using a remote connection from a game to download x files to the server. but I cant find a away to to that. I have found this little code ...<?php $zip = new ZipArchive; $res = $zip->open(''); if ($res === TRUE) { $zip->extractTo(''); $zip->close(); echo 'ok'; } else { echo 'failed'; } ?> I would like to unzip it in a folder with the same name.I hope u can help me with this little problem.Thanks and regards. Edited December 16, 2015 by nomorekillz Quote Link to comment Share on other sites More sharing options...
titcrunch Posted December 18, 2015 Share Posted December 18, 2015 first question your host have gzip ? Quote Best Regards Titcrunch French webdesigner in camel Design, Support, help and tutorials in : Forum Camel Design. Link to comment Share on other sites More sharing options...
nomorekillz Posted December 19, 2015 Author Share Posted December 19, 2015 gzip ? Whats that ? Quote Link to comment Share on other sites More sharing options...
titcrunch Posted December 19, 2015 Share Posted December 19, 2015 zip plugin for your server .... if you don't have this in first is impossible to zip and unzip in the server Quote Best Regards Titcrunch French webdesigner in camel Design, Support, help and tutorials in : Forum Camel Design. Link to comment Share on other sites More sharing options...
Kixay Posted January 3, 2016 Share Posted January 3, 2016 Very infomative I've used a similar code to my own script. Quote Link to comment Share on other sites More sharing options...
flo110 Posted April 4, 2016 Share Posted April 4, 2016 You should read the manual that php.net provides: http://php.net/manual/en/class.ziparchive.php Also make sure your php version is bigger than 5.2.0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.