DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

ZIP File PHP Code Script

01.31.2012
| 5947 views |
  • submit to reddit
        // ZIP File PHP source code script credits devco.net

//download this function first - http://uk2.php.net/manual/en/ref.zip.php

<?
require ("incl/zipfile.inc.php");
$zipfile = new zipfile();
$filedata = implode("", file("incl/zipfile.inc.php"));
$zipfile->add_dir("incl/");
$zipfile->add_file($filedata, "incl/zipfile.inc.php");
header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=zipfile.zip");
echo $zipfile->file();
?>


Credits: <b><a href='http://4dlink.com'>4DLink Web Lists</a></b> and <a href='http://web4link.com'>Web 4 link</a>