8586 posts Community Moderator
  • United Kingdom
  • 7 Years of Membership
  • Moderator
  • Winner
+10 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

8586 posts Community Moderator
  • United Kingdom
  • 7 Years of Membership
  • Moderator
  • Winner
+10 more
MSFX
Moderator
says
443 posts
  • 6 Years of Membership
  • Affiliate Level 1
  • Author Level 5
  • Beta Tester
+12 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
  • 6 Years of Membership
  • Affiliate Level 1
  • Author Level 4
  • 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
  • Affiliate Level 1
  • Author Level 4
  • Collector Level 2
  • Community Superstar
+10 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! ;)

263 posts
  • Weekly Top Seller
  • Elite Author
  • Author Level 8
  • Winner
+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.

8586 posts Community Moderator
  • United Kingdom
  • 7 Years of Membership
  • Moderator
  • Winner
+10 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 :(

8586 posts Community Moderator
  • United Kingdom
  • 7 Years of Membership
  • Moderator
  • Winner
+10 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