I’ve got a script which fetches zipped content from a web page. Under normal circumstances the browser would donwload this as a zip file, but for my script the remote server just returns the compressed string, and I’m trying to figure out how to uncompress it. Apparently it’s compressed using PKzip if that’s any help.
I’ve looked through the functions there, but they all seem to deal with a zipped file, rather than the actual zipped contents. What I’ve got is the zipped output from a remote server.
Have re-visited this problem and got it sussed.
I think the main problem I had was that I was grabbing a stream straight from a website, and part of this stream was the headers. I needed to remove the headers and then the content of the response was a valid zip file.
I unzipped it using the pclzip class. I’m not sure whether the gzinflate would have been correct or incorrect for zipped content, but I think the headers were the main problem.