Help with Zip function

I’m trying to find a way to create a link that will zip a folder for download.

I’ve been working with this, but it doesn’t seem to work.

Any help is very much appreciated.

<?php $the_dir = '/home/.adcom/j_delong/'; `/usr/bin/zip $the_dir`; $the_zip = $the_dir.'.zip'; header('Content-type: application/zip'); header('Content-Disposition: attachment; filename="'); readfile($the_zip); ?>

I haven’t messed with it, but maybe this page would be helpful:

If you scroll down, it lists some functions and users have contributed some sample code in the comments section.

:stuck_out_tongue: Save up to $96 at Dreamhost with ALMOST97 promo code (I get $1).
Or save $97 with THEFULL97.