SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Feel my RewiredMind KMxRetro's Avatar
    Join Date
    Jan 2001
    Location
    Exeter, Devon, UK
    Posts
    477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question ZIP or RAR file support in PHP?

    Howdy guys (and gals),
    Let's say I have a screenshots archive (which I do ) and I want to upload new screenshots via FTP in ZIP format.

    When the ZIP is on the server, is there any way that I can unzip the file through PHP (or CGI for that matter) into a specific directory?

    RAR format would be fine too...

    Thanks in advance folks,

  2. #2
    SitePoint Member burchyk's Avatar
    Join Date
    Mar 2002
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb

    Maybe you should play with system execution functions
    such as exec() or system() to run arch/unarchiving in shell/cmd

  3. #3
    will code HTML for food Michel V's Avatar
    Join Date
    Sep 2000
    Location
    Corsica
    Posts
    552
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP has support for Zip read access only, so theorically you could do it with zip.
    http://www.php.net/manual/en/ref.zip.php


    If you find out you cannot use Zip (not every host compiles PHP with this extension), try Gzip (what I would advise actually).
    http://www.php.net/manual/en/ref.zlib.php

    To produce Gzip files on Windows, you can use the standalone gzip.exe and gunzip.exe functions for DOS/Cygwin (you'll find them easily), or use PowerArchiver which just happens to be like Winzip, only minus the nagging screen and plus tar/gzip/bzip2 support.
    Last edited by Michel V; Mar 19, 2002 at 03:58.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •