<?php
// Set path to download zip file
$dl_url = 'http://'.$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"]).dirname($_SERVER["PHP_SELF"]).'.zip';
echo '<div style="display:none">';
// Check if everything's cool and groovy - create a link to download zip file
if (system('zip -r /home/USERNAME/www/FOLDER/FILE.zip //home/USERNAME/www/FOLDER/'))
{
echo '</div><div><p>Zip file created successfuly</p>';
echo '<a href="' . $dl_url . '">download a zip file for this Album</a>';
} else {
echo '</div><div><p><font color=red>Zip Failed.</p>';
}
echo "</div>";
?>