Im looking to build a simple upload site, that will generate temporary URLS to video files after a captcha has been entered. I need to protect the true location of the files, so they cannot be hotlinked directly. A time based url, that expires after x minutes seems like the best option, but Im not sure on the actual implementation.
Any tips?
Make your urls like this:
http://myvid.com/video?id=1×tamp=12341561234&hash=1203941h23jk479sdf87sdf
Where timestamp is the unix timestamp and hash is an md5 hash, say, of the timestamp appended to a secret string on the server.
Then, when you play that video, check if the timestamp field is valid (by using the hash), and then check to see how old the timestamp is.