Simple File Server and Downloader Script
Mar 10, 2008
If your blogs or sites have download links to your files, you might want to put all of your files in one directory rather than have them scattered throughout your site. This way you can manage them easier.
To download these files, you provide a downloader script. The script can be used for protection from direct download, check user's authentication, write logs, and such.
I've made a simple script for this purpose. It has features:
- Can download any files: zip, images, pdf, php, etc.
- Displays a 'You are downloading...' page before sending the file.
- Simple and easy to develop.
Keywords: simple file server, downloader script, force download, download management
Share:
Save to del.icio.us
Digg this!



Add your comment
Hi Nashruddin,
In download.php file, i realise that download.php must be place in the same directory of the folder.Is it possible that i can place it public_html/download.php ,while my download folder is at public_html/upload/? dirname(__FILE__);
Hello Dennis,
Yes it is possible to place download.php in some other directory. Suppose your files reside in /var/www/pub/downloads, just change the line:
$fileserver_path = dirname(__FILE__);
with this:
$fileserver_path = "/var/www/pub/downloads";
Hi!
Is it possible to have the files on a remote server, rather on the local server, if not do you know of a script that can do this.
thx
Petter
This script and your files should be in the same domain. otherwise the script wont work. Sorry I dont have info for such a script.