webref.eu Posted December 28, 2008 Share Posted December 28, 2008 Once a user has registered on my site, I want to send them an e-mail to validate their e-mail address exists. What techniques are normally used to achieve this? Please let me know any suggestions. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/138658-solved-confirm-e-mail-exists-on-user-registration/ Share on other sites More sharing options...
RussellReal Posted December 28, 2008 Share Posted December 28, 2008 what you could do.. is just on register.. put into the database table.. md5(rand(0,55)."{$password}{$username}"); then mail that string to the user in a GET variable in the url like http://site.com/auth.php?authcode=76298389a98nc9001208723 then when they click it have a field in the database `authenticated` then update the row which authcode equals the authcode specified UPDATE `members` SET `authenticated`='TRUE' WHERE `authcode` = '{$_GET['authcode']}' Quote Link to comment https://forums.phpfreaks.com/topic/138658-solved-confirm-e-mail-exists-on-user-registration/#findComment-724947 Share on other sites More sharing options...
webref.eu Posted January 5, 2009 Author Share Posted January 5, 2009 OK, that seems like a possible technique. Does anyone else have any thoughts or comments? Rgds Quote Link to comment https://forums.phpfreaks.com/topic/138658-solved-confirm-e-mail-exists-on-user-registration/#findComment-729999 Share on other sites More sharing options...
sloth456 Posted January 5, 2009 Share Posted January 5, 2009 seems like a pretty good technique. You know how to implement this right? Quote Link to comment https://forums.phpfreaks.com/topic/138658-solved-confirm-e-mail-exists-on-user-registration/#findComment-730013 Share on other sites More sharing options...
Maq Posted January 5, 2009 Share Posted January 5, 2009 User interaction is the most definite to checking whether an email exists and is valid. But some other things you could do... 1) Use regex to check if it's a valid format. 2) Read this article. I haven't tried it but it looks like it contains code to see if the user has a valid email address. Quote Link to comment https://forums.phpfreaks.com/topic/138658-solved-confirm-e-mail-exists-on-user-registration/#findComment-730025 Share on other sites More sharing options...
bluesoul Posted January 5, 2009 Share Posted January 5, 2009 User interaction is the most definite to checking whether an email exists and is valid. But some other things you could do... 1) Use regex to check if it's a valid format. 2) Read this article. I haven't tried it but it looks like it contains code to see if the user has a valid email address. The method presented in the article is shaky at best, in that a lot of bogus registrations are still going to pass on through. I find it a bit humorous that two of the three bogus emails he mentions, donald@duck.com and emailthis@hahaha.com, would pass the test he wrote. So 33% of the time, it works every time. Quote Link to comment https://forums.phpfreaks.com/topic/138658-solved-confirm-e-mail-exists-on-user-registration/#findComment-730037 Share on other sites More sharing options...
webref.eu Posted January 5, 2009 Author Share Posted January 5, 2009 seems like a pretty good technique. You know how to implement this right? I hope to be able to work it out step by step. I was just hoping to invite others thoughts and comments before I spend too much time on one particular technique. Rgds Quote Link to comment https://forums.phpfreaks.com/topic/138658-solved-confirm-e-mail-exists-on-user-registration/#findComment-730063 Share on other sites More sharing options...
Maq Posted January 5, 2009 Share Posted January 5, 2009 User interaction is the most definite to checking whether an email exists and is valid. But some other things you could do... 1) Use regex to check if it's a valid format. 2) Read this article. I haven't tried it but it looks like it contains code to see if the user has a valid email address. The method presented in the article is shaky at best, in that a lot of bogus registrations are still going to pass on through. I find it a bit humorous that two of the three bogus emails he mentions, donald@duck.com and emailthis@hahaha.com, would pass the test he wrote. So 33% of the time, it works every time. I was a bit lazy with the link as a mentioned I have not tried it. It came up top 10 on Google so I thought it may be good. It was primarily supposed to give you more so an idea rather than a solution but w/e. I do strongly suggest that you use multiple techniques to filter out the most emails, there's almost always going to be a couple that squeeze by but there's nothing you can really do. As bluesoul said: So 33% of the time, it works every time. Words from a statistical genius Quote Link to comment https://forums.phpfreaks.com/topic/138658-solved-confirm-e-mail-exists-on-user-registration/#findComment-730118 Share on other sites More sharing options...
webref.eu Posted January 7, 2009 Author Share Posted January 7, 2009 what you could do.. is just on register.. put into the database table.. md5(rand(0,55)."{$password}{$username}"); then mail that string to the user in a GET variable in the url like http://site.com/auth.php?authcode=76298389a98nc9001208723 Thanks for this suggestion, this is what I'm implementing. Rgds Quote Link to comment https://forums.phpfreaks.com/topic/138658-solved-confirm-e-mail-exists-on-user-registration/#findComment-731824 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.