downloading a zip archive from another server

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I have a PHP-program that opens an archive and operates on its
contents. I would like the program to download the file over http,
possibly from a foreign server, using a URL.
I have tried using ZipArchive::open, with the URL as the filename, but
this gives me an error code 11 (the meaning of which is not documented
anywhere I could see).

How do I accomplish this?



Re: downloading a zip archive from another server

file_put_contents($path, file_get_contents($url));

Or something to that effect. Else, modify the zipArchive source itself and
use file_get_contents instead of whatever operation they use to 'get' stuff

Quoted text here. Click to load it

Site Timeline