I want to write a script to help control downloads on a site that I look after so that users will have to provide a name an email address in order to download.
My initial thought was that the easiest way to ensure that details provided are correct is to email the link to the address given. If I do that though, I have to put something in place to ensure that forwarding that email to a friend won't also allow them to get a copy of the download.
Has anyone done something similar to this, or have some ideas on the best way to do it?
My thought was to create an entry in a table for each registered download that contains a valid-to time, the file location and a unique ID. The user would then be sent a link to a download page with that ID in the URL. The download page itself would check that the time was valid, update the table (to show it had been downloaded) and then serve the file (I assume I can hide the URL by redirecting to the file in the headers).
Really I am jsut posting to see if people think:
1. the above would work
2. there is an easier way