techiefreak05 Posted March 7, 2007 Share Posted March 7, 2007 I have a social network that is pretty much complete, but I don't want people to make obscure accounts, so i was thinking e-mail verification. I have an idea on how to implement this, what do you think? 1. When a user registeres create a really long hard to guess "token" of some sort and store it in the DB 2. When they recieve the e-mail after signup, they click a link that sends them to the page with their token in the URL, and it "verfies" the account. what should i use for the token? Link to comment https://forums.phpfreaks.com/topic/41696-user-e-mail-verificatio/ Share on other sites More sharing options...
trq Posted March 7, 2007 Share Posted March 7, 2007 Just knocked this up... <?php function generatetoken($length) { $letters = range('a','z'); for ($i = 0;$i < $length;$i++) { $token .= $letters[rand(1,26)]; } return $token; } $token = generatetoken(40); ?> Might give you some ideas. Link to comment https://forums.phpfreaks.com/topic/41696-user-e-mail-verificatio/#findComment-202113 Share on other sites More sharing options...
suzzane2020 Posted March 8, 2007 Share Posted March 8, 2007 this was quite an interestin post and i was hoping to c the replies.. This idea sounds grt!!. Link to comment https://forums.phpfreaks.com/topic/41696-user-e-mail-verificatio/#findComment-202118 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.