News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPit.net:
Creating ZIP and TAR archives on the fly with PHP
May 14, 2006 @ 14:57:25

Published today, PHPit.net shares this new tutorial highlighting the creation of ZIP and TAR archives dynamically with the contents of your choosing.

In this tutorial I will show you exactly how to do that. Thankfully there are two excellent libraries in the PHP Extension and Application Repository (PEAR) which makes it a lot easier since all the hard stuff has been written for us already.

You will also learn how to stream these dynamically created archives using the right headers so that the browser will know it's an archive, and not a normal PHP page.

With the help of the Archive_Zip package from the PEAR libraries, following the steps to create an archive is simple. They assume that you already have the PEAR setup installed on your system and can easily pull in the Archive_Zip package before starting the tutorial. They help you create a sample archive, show the steps to make an archive from a directory, fixing the directory paths to make extraction easy. They even compress it all into one function to make for easy reuse later on.

0 comments voice your opinion now!
zip tar archive create dynamic archive_zip pear package zip tar archive create dynamic archive_zip pear package


blog comments powered by Disqus

Similar Posts

Community News: Latest PEAR Releases for 07.10.2006

David Coallier's Blog: PEAR::Validate 0.8.0 released...THE release, finally

Stuart Herbert's Blog: Getting PEAR Working On Windows 7

PEAR Blog: PEAR in August

PHPro.org: Dynamically Create Menu With PHP DOM


Community Events





Don't see your event here?
Let us know!


language project series framework community application threedevsandamaybe podcast library laravel interview api wordpress code introduction list release configure developer bugfix

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework