> Users can upload their files, but the files they upload can only be
> downloaded X amount of times. After they've been downloaded so many
> in
> an ideal world they'd be automatically removed, though just to be made
> people couldn't download them anymore would be great.

You need a download manager.

This can be a simple PHP script. You simply route all of your download
requests to a URL like


download.php will grab the $fileid and look in a database or file to see
how many times fileid 45 has been downloaded. If it's below your
threshold, then download.php will send the appropriate headers for the
file that's requested, and then send the data of the file. Store the
files outside of the web root for the best protection. If the file has
already been downloaded X times, then just show an HTML page that says
the limit is up.

---John Holmes...

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to