8377 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

8377 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 6 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! ;)

262 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Won a competition
  • Has been part of the Envato Community for over 5 years
+6 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.

8377 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 :(

8377 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 :)

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by