-
Website
http://buildingbrowsergames.com -
Original page
http://buildingbrowsergames.com/2008/05/09/building-browsergames-implementing-an-e-mail-confirmation-system-php/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
gabrielbianconi
1 comment · 1 points
-
Luke
82 comments · 1 points
-
spatlabor
1 comment · 1 points
-
HughCompton
2 comments · 1 points
-
obat jerawat
1 comment · 1 points
-
-
Popular Threads
It certainly does not proove that the user is able to read email sent to the address she says she is.
Once the user confirms one account (the real one) and learns the confirmation URL, will be able to "confirm" any email address she wishes. bill.gates@microsoft.com? Just enter http://website.com/confirm.php?email=bill.gates... in browser - voila!
The real confirmation is to use some secret data (the templated URL is not secret) sent to the given e-mail address.
You meay for example add another text column 'confirmation_token' to the DB, put some random string in it and send http://website.com/confirm.php?token=random_string to the given address. Then use the given token to flag validated in DB row. This way the user has no way of guessing the confirmation token unless she really got the email.
You're definitely right about our e-mail system not being particularly
secure - and using tokens would be a much better way to make it that way.
However, it seems that everyone wants e-mail confirmations to work
differently - which is why it's built the way it is. Modifying it from how
it is now to working now to however you want it to instead should be simple
enough.
I added this "confirmation_token". Have a look at this: http://pastebin.com/fd19ea57
Oh and btw... i dont get any email after registering. :( But the the account is generated in the Databse.
This is my register.php:
http://pastebin.com/f3b82f8bb
settings aren't configured properly in your php.ini. You'll probably need to
talk to your webhost to see what they should be.
But the "confirmation_token" is free of errors.
Anyway, thanks for answering!
I can now go ahead and personalise it to meet my need. Great resource :)
I am trying to implement this system as part of your tutorial but I am having a couple of problems, perhaps stemming from the same error. When I test my registration page at this stage it attempts to load 'register-email.php' as a new page which does not exist, unless I have somehow missed that part. Also sometimes it will update the database with the registrants information but no email will be sent out. I understand this may have something to do with my php.ini which I do have access to but I do not understand what I should be looking for to remove the error.
Thanks in advance for any help you can offer, also thanks for an amazing tutorial!
Ant
I think all the configuration is right but .....