How to Extract ZIP Files on FTP Server using PHP?

I was having hard time uploading CMS files to the server to install it, but finally I found this great script that works fine for me, now I can FTP the zip files, and then unzip them easily in no time at all using the unzip script. 

Overview:
This application is useful when there is a need to upload a many files with complicated directory structure to web server, for example, forum systems (like phpBB) or other applications like phpMyAdmin) which consist of many files arranged in complicated directory structure. All you need to do is to upload the archive file and PHP Unzipper will take care of creating the correct directory layout and file extraction. This program is especially helpful when you don’t have FTP access to web server but generally it will be helpful in all cases when there is a need to upload many small files to web server.

Network assessment services help companies run their IT resources smoothly and efficiently.

Installation:

  1. Upload files index.php and pclzip.lib.php to your web server (of course, put both files in the same directory, also you can rename index.php to whatever you wish)
  2. CHMOD index.php to 777
  3. Open index.php in your web browser, it will ask to register first.
  4. Type in the username and the password
  5. Now you can login and start to use the program.

Note: username and password are stored in the pass.php file and they should be absolutely inaccessible to anyone except you. If you ever forget/want to change them, just open this file and they will be there :)

Usage:
Everything is as simple as possible here:

  • Browse through directories and look for zip files.
  • Once you find a zip file you can either view its contents or unzip it. If you choose to view it, file listing will be displayed. If you choose to unzip it, the archive will be extracted in the same directory.

You can download it here, I am sharing it with everybody as it’s licensed under GNU Lesser General Public License.

Most Commented Posts



Nice Blogger



Enter your email address:

Delivered by FeedBurner




32 Responses to “How to Extract ZIP Files on FTP Server using PHP?”

  1. Dear Friend,

    I face the same problem and you help me at the end.

    Thanks friend

    [Reply to this comment]

  2. Perfect Solution.
    Thanks

    [Reply to this comment]

    Hesham Reply:

    @Bilal Ahmed Bajwa, You are welcome, glad that you like it!

    [Reply to this comment]

  3. Nina says:

    This is really great

    [Reply to this comment]

    Hesham Reply:

    Thanks @Nina, Glad you like it and I hope it will be useful for you!

    [Reply to this comment]

  4. fatmaggie says:

    didn’t work for me, size error

    [Reply to this comment]

  5. fatmaggie says:

    this is what i get

    Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 543 bytes) in /**/pclzip.lib.php on line 3387

    [Reply to this comment]

    Hesham Reply:

    Hello @fatmaggie, i am not the developer who made this script, I have used it before and it worked for me just fine, maybe you didn’t follow the steps, plz try to follow the steps once again!

    thanks for your visit.

    [Reply to this comment]

  6. sabina says:

    Thanks it works for me too but i havenot tried for the file having more size…but it works…..

    [Reply to this comment]

    Hesham Reply:

    @sabina, That’s good, thanks a lot for your feedback!

    [Reply to this comment]

  7. Ran says:

    Just perfect. Thanks!

    [Reply to this comment]

    Hesham Reply:

    You are welcome @Ran, I feel great when ever someone find this useful!
    Hesham´s last blog ..Features That Didn’t Make it into Wordpress Version 2.8 My ComLuv Profile

    [Reply to this comment]

  8. IJ Styles says:

    Very cool post. These are the informations that I was looking for. Stay Awesome!

    [Reply to this comment]

    Hesham Reply:

    @IJ Styles, You are welcome.. check my latest post for more scripts!
    Hesham´s last blog ..How To Compete Limited Godaddy File Manager Archiving Tool My ComLuv Profile

    [Reply to this comment]

  9. You save lot of time.
    Thanks a lot.

    [Reply to this comment]

    Hesham Reply:

    @Anirudh Singh, Great .. you are welcome!
    Hesham´s last blog ..How To Compete Limited Godaddy File Manager Archiving Tool My ComLuv Profile

    [Reply to this comment]

  10. Guru Amrit Preet Singh says:

    Its cool. Thank you very much for sharing the unzipper.

    [Reply to this comment]

    Hesham Reply:

    @Guru Amrit Preet Singh, thank you for your comment, I am happy that this helped you! Good Luck!
    Hesham´s last blog ..How to Generate Content and Ideas for your Blog from your own Tweets by Twitter Tools? My ComLuv Profile

    [Reply to this comment]

  11. Salmon says:

    Uhmmm im having a problem, once i finished registering and click on the “you can login now” link i just get sent back to the register page …

    [Reply to this comment]

    Hesham Reply:

    @Salmon, I am so sorry Salmon, I am not into code that much, I am just using this script and it’s working for me just fine! I am not sure why you are getting this error!
    Hesham´s last blog ..Nothing can stop Famous Bloggers Club FBC from Getting Famous My ComLuv Profile

    [Reply to this comment]

  12. Kiuncobra says:

    how to turn CHMOD to 7777 ..
    what is it ?
    and how is it ?

    please help me brother
    Kiuncobra´s last blog ..[Mp3] Aadhavan[LAME | VBR | Crystal|Clear|Quality+ With Cover] My ComLuv Profile

    [Reply to this comment]

    Hesham Reply:

    @Kiuncobra, This post will help you to understand what is CHMOD
    Hesham´s last blog ..Nothing can stop Famous Bloggers Club FBC from Getting Famous My ComLuv Profile

    [Reply to this comment]

  13. reckjavik says:

    OMG IT WORKS great I am really appreciate for your work ,you saved my time
    thanks friend.!!!!!

    [Reply to this comment]

    Hesham Reply:

    @reckjavik, Yeah it’s working and this is why I share it with all of you! you are welcome!
    Hesham´s last blog ..36 Links at Spicy Week on Twitter My ComLuv Profile

    [Reply to this comment]

  14. reckjavik says:

    can u tell how I extract other formats using this .? or do I need another codes or an extension?

    [Reply to this comment]

    Hesham Reply:

    @reckjavik, I am sorry but this is the only format this code can handle, I am not the developer of this script! but I will be so happy if I got an email or a comment from you one day telling me that you have found something interesting!

    [Reply to this comment]

  15. rckapildev says:

    awesome tool, its working fine for me

    [Reply to this comment]

    Hesham Reply:

    @rckapildev, I am glad that you find it helpful for your work!
    Hesham´s last blog ..Famous Bloggers are Driving Me Crazy! My ComLuv Profile

    [Reply to this comment]

  16. saidbakr says:

    Thank you very much. It seems like a magic for my problem!
    saidbakr´s last blog ..نوع وضيع من البريد التطفلي My ComLuv Profile

    [Reply to this comment]

  17. Please help me, I am getting following error:

    Warning: chdir() [function.chdir]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/a9030732/public_html/upload/index.php on line 249

    [Reply to this comment]

  18. Faulkner says:

    no it works well It works well with me well
    set the CMD to 777 and dont put the .php files into the root directory it may cause the trouble.

    and make sure your host supported with latest php version.

    it doesn’t need a SQL database. :)

    [Reply to this comment]

Leave a Reply

CommentLuv Enabled