I'm trying to write a script that allows an admin of a photo uploading system download all their photos at once. Currently I am using
system('zip -r '.$_SERVER['DOCUMENT_ROOT'].'/zip.zip '.$_SERVER['DOCUMENT_ROOT'].'/images/photo-uploads';
to zip the files but this seems to echo names and locations all the files onto the page. Is there anyway to get around this? If not what is the best way to zip files on server.