Unzipping files with PHP

Discussion in 'PHP' started by Nick_Mayhem, Mar 13, 2006.

  1. #1
    Well as usual I am again stuck with a single line of code in my development.

    I have setup a script which downloads the file automatically every 24hours.

    The file is in zip format. So I want to have a peice of code that can unzip that file and extract its content on my webserver.

    I tried zip_open(); but it is not working on my server as they don't have that library installed.

    Any other ideas would be very helpful.

    Thanks.
     
    Nick_Mayhem, Mar 13, 2006 IP
  2. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #2
    From PHP.net:

    http://uk2.php.net/zip

     
    T0PS3O, Mar 13, 2006 IP
    vishwaa likes this.
  3. Nick_Mayhem

    Nick_Mayhem Notable Member

    Messages:
    3,486
    Likes Received:
    338
    Best Answers:
    0
    Trophy Points:
    290
    #3
    humm... I tried both of this.

    The first one gives me zip_open function. Which my server doesn't supports and I am on a shared server.

    The other one is fine but then It is not giving proper results.

    It is creating an empty zip file in the place of the original instaed of extracting it.

    So still in the problem.
     
    Nick_Mayhem, Mar 13, 2006 IP
  4. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Scroll down on that page for other alternatives.
     
    T0PS3O, Mar 13, 2006 IP
    Nick_Mayhem likes this.
  5. Nick_Mayhem

    Nick_Mayhem Notable Member

    Messages:
    3,486
    Likes Received:
    338
    Best Answers:
    0
    Trophy Points:
    290
    #5
    K. Thanks.

    Yeah I found some alternatives.
     
    Nick_Mayhem, Mar 13, 2006 IP