- Attended a Community Meetup
- Community Moderator
- Has been a member for 5-6 years
- United Kingdom
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Contributed a Blog Post
- Beta Tester
- Bought between 50 and 99 items
I’m looking for a solution for unzipping /extracting a loaded ZIP onto a server using PHP into a folder of the same name…
The ZIP will contain an unspecified number of files and directories and needs to be unzipped into a folder with the same name as the ZIP folder…
Anyone know of any libraries available for this?
Matt / MSFX
- Attended a Community Meetup
- Community Moderator
- Has been a member for 5-6 years
- United Kingdom
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Contributed a Blog Post
- Beta Tester
- Bought between 50 and 99 items
lol
didn’t realise it was supported….
http://nz2.php.net/manual/en/function.ziparchive-extractto.php
http://zziplib.sourceforge.net/
lush
- Attended a Community Meetup
- Author had a File in an Envato Bundle
- Author had a Free File of the Month
- Author was Featured
- Beta Tester
- Bought between 1 and 9 items
- Envato Staff
- Exclusive Author
- Featured in a Magazine
I’m looking for a solution for unzipping /extracting a loaded ZIP onto a server using PHP into a folder of the same name…The ZIP will contain an unspecified number of files and directories and needs to be unzipped into a folder with the same name as the ZIP folder…
Matt / MSFX
hmmm… Excellent sounds like a streamlined approach to speed things up a bit on your end!! Nice.
Also, real quick- any work on the BETA for 3D when we might get rolling?
Thank you
http://codeazur.com.br/lab/fzip/ check it out this is a flash actionscript 3 class for handliing with zip files
- Author had a Free File of the Month
- Microlancer Beta Tester
- Beta Tester
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Item was Featured
- Author was Featured
- Referred between 1 and 9 users
http://codeazur.com.br/lab/fzip/ check it out this is a flash actionscript 3 class for handliing with zip files
brilliant class! 
Thanks! 
- Bought between 10 and 49 items
- Exclusive Author
- Has been a member for 3-4 years
- Item was Featured
- Referred between 50 and 99 users
- Sold between 100 000 and 250 000 dollars
- Won a Competition
I have a small script that I upload to the server whenever I need to extract a zip archive, here’s the code:
<?php $filename = $_GET['archive'];
$zip = new ZipArchive;
if ($zip?>open($filename) === TRUE) {
$zip->extractTo('./');
$zip->close();
echo 'The file <strong>'.$filename.'</strong> Extracted successfully';
} else {
echo 'failed';
}
?>
How to use
Copy the file to your server to the same directory as where the ZIP archive is, and then extract using the following syntax: http://example.com/blah/unzip.php?archive=file.zip.
It’s worked wonders so far. Make sure you have write permissions to the directory you’re trying to extract, otherwise the extraction will fail. Also, it won’t extract the contents to a directory of the same name, it will just extract the contents to the current directory.
- Attended a Community Meetup
- Community Moderator
- Has been a member for 5-6 years
- United Kingdom
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Contributed a Blog Post
- Beta Tester
- Bought between 50 and 99 items
http://codeazur.com.br/lab/fzip/ check it out this is a flash actionscript 3 class for handliing with zip files
I looked at this a while ago but quickly looking over their docs there was no way to unzip to the server… its only for reading ZIPs into Flash 
- Attended a Community Meetup
- Community Moderator
- Has been a member for 5-6 years
- United Kingdom
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Contributed a Blog Post
- Beta Tester
- Bought between 50 and 99 items
I have a small script that I upload to the server whenever I need to extract a zip archive, here’s the code:
<?php $filename = $_GET['archive']; $zip = new ZipArchive; if ($zip?>open($filename) === TRUE) { $zip->extractTo('./'); $zip->close(); echo 'The file <strong>'.$filename.'</strong> Extracted successfully'; } else { echo 'failed'; } ?>How to use
Copy the file to your server to the same directory as where the ZIP archive is, and then extract using the following syntax:
http://example.com/blah/unzip.php?archive=file.zip.
It’s worked wonders so far. Make sure you have write permissions to the directory you’re trying to extract, otherwise the extraction will fail. Also, it won’t extract the contents to a directory of the same name, it will just extract the contents to the current directory.
will give it a go in the morning, if it works you can have a beer on me 
