When I moved to my current hosting provider, I lost the ability to SSH into my account. Most of the stuff I did in SSH can be done through the account’s control panel, including uploading and unzipping files. But one of the things sorely missing is the ability to easily zip up and download a whole directory. With SSH, I would do the following:
tar -czf directory archive.tgz
And then the download the archived file. With my current setup, I’d have to download the directory via FTP one file at a time (well, the FTP program would be doing one file at a time).
I searched around and didn’t find a simple script that would do what I needed — and nothing more. So I wrote PHP Download. It allows you to easily download a directory as a gzipped tar archive from your web browser. The script should work on most Unix systems and browsers.
To use it, you have to configure a password and, optionally, a base directory. If a base directory is not specified, the script will grant you access to anything at and below the directory where it’s located.
When you access the script, you’ll be required to log in with the password that you configured. The script then lists all the files and directories in the base directory. You can navigate to subdirectories or download any directory or file as a .tgz archive.