Extracting a Zip file with PHP

I recently had to make a quick script to extract the contents of a zip file, this zip file is copied via ftp from a remote server and stored locally. The file name to request and transfer is set via URL Encoding. This were originally a function, which I converted into a class and now devolved totally for this small script.

Sometimes quick and dirty tasks, require quick and dirty code, using the class would have been overkill. As usual there are a dozen ways to do this, and you could remove the error checks and echo’s to make the code even more compact.

Its a little messy, but were procedural code, converted into a function, then part of a class and back to a procedural layout.

A Manchester Based Photographer and Website Developer with interests in Strongman, Fitness and Geekery.

Leave a Reply

Your email address will not be published. Required fields are marked *