View Single Post
Old 12-19-2007, 12:42 AM  
rowan
Too lazy to set a custom title
 
Join Date: Mar 2002
Location: Australia
Posts: 17,393
Quote:
Originally Posted by Swish View Post
Do this in a database. Store a unique id for each link sent (i.e. md5($email . time()); ) using the md5 hash prevents people guessing for someone else's link (by incrementing a numeric value like id=5 as suggested above).
If you use hashes then there's a small chance that they will not be unique across two or more messages. Better to generate an array of hashes, weed out any dupes, and then allocate IDs from that.
rowan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote