Call Zipfile from Remote Server, and extract it.

7 replies
Hey guys,

I am looking for an auto update solution for my software. I want to call a zip file from a remote server, download it, and then extract it's contents replacing old contents.

Anyone have a solution for me?

A total package would include a progress bar.

I can also build this myself if I have the right leads.

thanks!
adbox
#call #extract #remote #server #zipfile
  • Profile picture of the author customertools
    What language is your software written in?

    PHP, Delphi, Visual Basic, C#, etc??? There are different solutions for different languages.
    {{ DiscussionBoard.errors[1710669].message }}
  • Profile picture of the author atwellpub
    excuse me sorry, php
    {{ DiscussionBoard.errors[1710742].message }}
  • Profile picture of the author customertools
    Well you can use get_file_contents('http://www.urltozipfile.com/file.zip'); to download the file. (Or CURL, of fSOCK, I usually use CURL) then you can use PhpConcept - PclZip (PhpConcept Library Zip) to unzip it. Fairly easy solution.

    An old project of mine I did this, and I would edit an HTML file and set a META tag on it a to tell me the version of the file. If the version was less than what the current version was it would download the zip file, else it would not.

    I don't use this technique anymore, I've actually got the licensing doing all the checking for updates.

    -Brad
    {{ DiscussionBoard.errors[1710917].message }}
    • Profile picture of the author atwellpub
      Originally Posted by customertools View Post


      I don't use this technique anymore, I've actually got the licensing doing all the checking for updates.

      -Brad
      Hey Brad,

      What do you mean by this?

      Great to hear that curl can cover this. See, My package is about 8 mb, and I'll need a progress bar too, I imagine.

      And as far is the zip solution, is this standard enabled in php5? Thanks for the support.

      Hudson
      {{ DiscussionBoard.errors[1710928].message }}
  • Profile picture of the author customertools
    For a progress bar you can use Ajax and the bites returned by curl. I don't really have time to go in debt on how to do this. but if it's server to server, 8mb will be "fast", no progress bar really needed.

    The built in PHP zip support is not enabled on a lot of servers. The link I gave you works with php4/5.
    {{ DiscussionBoard.errors[1711142].message }}
  • Profile picture of the author atwellpub
    .,. Thank you
    {{ DiscussionBoard.errors[1711154].message }}
  • Profile picture of the author customertools
    u can look here: cURL Download Progress in PHP not working ? - Stack Overflow this might help, the example should work on php 5.3+ not sure what version your using. Also these programming type questions are usually better answered on stackoverflow.com

    -Brad
    {{ DiscussionBoard.errors[1711170].message }}

Trending Topics