in reply to Ideas for implementing download links that expire, via e-mails
I'd use this technique:
Then, when the link is activated, the CGI script would look up the string (I'd add a WHERE clause in the SQL query to say "where time created is greater then now - 24 hours"). If its the query returns a result, then the link is OK, otherwise the user gets an "invalid or expired link" message that suggests they check they copied it correctly (watch for word wrap) and offers them a chance to generate a new one.
A regular process (probably triggered by cron) would then delete old entries from the database.
This is the type of thing that would be used for mailing list conformation emails. I wrote something along those lines for a "Forgotten your password" section of a website.
The technique generates randomish tokens to identify users, but that is about as similar as it gets to sessions.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Ideas for implementing download links that expire, via e-mails
by polettix (Vicar) on Apr 22, 2005 at 10:08 UTC | |
|
Re^2: Ideas for implementing download links that expire, via e-mails
by ghenry (Vicar) on Apr 23, 2005 at 20:33 UTC |