P is for Practical | |
PerlMonks |
Throw-away URLs perhaps?by orkysoft (Friar) |
on Jan 29, 2001 at 09:14 UTC ( [id://54947]=note: print w/replies, xml ) | Need Help?? |
Give the client a URL with some 'random' element in it, and at the server-side, record this same 'random' element. Once the URL is accessed once, that access is recorded (say, by a CGI script that the URL calls), so future attempts at using that 'random' value won't work anymore. http://www.somewhere.com/getfile.pl?file=win2k+without+bugs&key=RND#Getfile.pl must know that number is a valid key, and once it's used, it should be either marked invalid, or just forgotten about. If you mark it as used, the program can tell the user the key is invalid, and let him contact tech support (connection could have been lost, resulting in an incomplete download), so they can analyze logs, and decide whether to re-enable the key. Update: tilly prefers pathinfo parameters, because of some bug with Excel not liking ? in URLs. (I don't know why Excel would be involved here, though.) http://www.somewhere.com/getfile.pl/goodie/41579087Okay, for completeness, here's what tilly says:
In Section
Seekers of Perl Wisdom
|
|