SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Download and unzip using PHP

    Hi,
    I am trying to download a small zip file from another website and then open the contained txt file all through PHP. Does anyone know how I can achieve this?
    Regards
    Cameron
    Guffnet - Website hosting and design - http://www.guffnet.com
    ASPonFire - Free ASP and .NET hosting - http://www.asponfire.com
    PGBid - Let the bidding begin - http://www.pgbid.com

  2. #2
    SitePoint Zealot krt's Avatar
    Join Date
    Sep 2005
    Location
    Australia
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    File handling functions e.g. file_get_contents() or cURL can be used to download the archive from the remote host.

    As for unzipping, you can see if the PHP extension for this is enabled, if not, you can try Pear::File_Archive.


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
  •