8269 posts Community Moderator
  • Has referred 10+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Attended one of our Meetups around the world
+9 more
MSFX Moderator says

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

8269 posts Community Moderator
  • Has referred 10+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Attended one of our Meetups around the world
+9 more
MSFX Moderator says
443 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+9 more
vibes35 says
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

22 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Located in Brazil
+2 more
guinetik says

http://codeazur.com.br/lab/fzip/ check it out this is a flash actionscript 3 class for handliing with zip files

1612 posts
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Contributed a free file of the month
+9 more
DaniMun says
http://codeazur.com.br/lab/fzip/ check it out this is a flash actionscript 3 class for handliing with zip files

brilliant class! :)

Thanks! ;)

256 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Won a competition
+5 more
der says

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';
        }
?&gt;
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.

8269 posts Community Moderator
  • Has referred 10+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Attended one of our Meetups around the world
+9 more
MSFX Moderator says
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 :(

8269 posts Community Moderator
  • Has referred 10+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Attended one of our Meetups around the world
+9 more
MSFX Moderator says

I have a small script that I upload to the server whenever I need to extract a zip archive, here’s the code:

&lt;?php $filename = $_GET['archive'];
    $zip = new ZipArchive;
    if ($zip?&gt;open($filename) === TRUE) {
        $zip->extractTo('./');
        $zip->close();
        echo 'The file <strong>'.$filename.'</strong> Extracted successfully';
    }    else {
        echo 'failed';
        }
?&gt;
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 :)

by
by
by
by
by
by