Page 1 of 1

control file downloads through apache

Posted: Fri Nov 24, 2006 12:15 am
by rameshmrgn
Is it possible to control file downloads in apache?

how to do?


Smiles,
Ramesh Mu

Posted: Fri Nov 24, 2006 5:21 am
by Mordred
What do you mean by "control" ?
There is the .htaccess/.htpasswd mechanism for access restrictions on folders and files

If you want rapidshare-style downloads, you can generate a unique path and copy the file for download there, and after some timeout delete it.

Posted: Fri Nov 24, 2006 9:28 am
by John Cartwright
Second from the botton in our Useful Posts Thread

Posted: Fri Nov 24, 2006 9:56 am
by Mordred
The trouble with fpassthru() is that download managers will not work with that url, unless you're ready to go and re-implement major parts of the HTTP server protocol ;)

If you don't care about download managers and continuing of broken downloads, it's fine.