Hello, I was wondering if it was possible to Compress a directory and all the containing files into a compress zipped file or another compressed file with php and then the compressed file put into the main directory for later download. I want this to be done automatically with cron jobs if possible it will be used to backup uploaded images on my site because i run a free image hosting site and i want everything to be backed up incase something happens and the site goes down. The Site is http://PhotoHoster.us/ I need the Directory: http://PhotoHoster.us/graphic to be compressed with cronjob and the compressed file to be put here: http://PhotoHoster.us/ in the main directory Thanks, John
You can use the tar command: tar cpvf <full/path/to/archivename.tar.gz> <full/path/to/graphicdir> You can use PHP's backticks operator: php.net/language.operators.execution or shell_exec: php.net/shell_exec