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

  • submit to reddit
        // ZIP File PHP source code script credits

//download this function first -

require ("incl/");
$zipfile = new zipfile();
$filedata = implode("", file("incl/"));
$zipfile->add_file($filedata, "incl/");
header("Content-type: application/octet-stream");
header("Content-disposition: attachment;");
echo $zipfile->file();

Credits: <b><a href=''>4DLink Web Lists</a></b> and <a href=''>Web 4 link</a>