Hi,
Many of you want and need to create zip files with PHP. There are many
libraries around there. Recently I got a library named zip.lib.php. This file is used in many popular PHP projects like PHPMyAdmin, SiteBar etc. This library was created by someone else I dont know. But its interface its a bit noisy. So I extend that class and make it
really flexible for you all.

I hope you would enjoy. Just download the library from here.

http://solutionmaker.info/ZipLib.zip

The above file contains the original class file and example of usage.
However I reapet the usage to show how easy is creating a zip file
with it.

<?
include("zip.lib.php");
$ziper = new zipfile();
$ziper->addFiles(array("mypdf.pdf","file.png")); //array of files
$ziper->output("myzip.zip");
?>

Thats it. The zip is created and there is no hassle at all.

Thanks
--BinaryMan
www.hasinme.info

Join PHPExperts Group for fantastic Messages.

http://groups.yahoo.com/group/phpexperts

    2 years later
    Write a Reply...