Re:Things You Probably Didn’t Know About PHP
by dutchflyboy on Tuesday January 12, 2010 @09:08AM
(#1047458)
1. I completely agree.
2. Well, there is a point, it blocks those people who just type anything in the registration forms. But I agree that it's too easy to trick. Performance shouldn't be a problem. Only registring users need to have their email addresses checked. In your example, every page load = a dns request, which isn't a great idea. As one registration = a dns request, this load should be quite easy to handle for the webserver.
Re:Things You Probably Didn’t Know About PHP
by ErrantX on Tuesday January 12, 2010 @09:06AM
(#1047449)
> then what's the point
rudimentary "junk" detection. I've used it in the past as a basic scheme to reject certain types of bots on a PHPBB forum.
Yes, it drives me nuts when people stress over picking the right regexp to "verify" email addresses. As if they're ever going to be able to detect that [email protected] is not legit.
The goal should just be to identify common typos (comma instead of dot). There's only one way to see if an email address is real.
Re:Things You Probably Didn’t Know About PHP
by cschneid on Tuesday January 12, 2010 @11:53AM
(#1047878)
But there is great value in telling that new user "Hey this doesn't look like an email address, please check it before continuing". Then accept whatever they put in (because really, email addresses are stupidly complex).
1. You can gzip strings before storing them in a DB
But many modern Databases/Filesystems have the built in ability to achieve the same effect - but faster and more transparently.
2. Verify an email’s host address is a valid DNS record.
True, you can. But what's the point? I see two possibilities - either you want to guarantee an address is legit or you don't. If you want a guarantee this doesn't get you anything (you'll still have to send a confirmation email). If you don't care, then what's the point (someone has to type [email protected] instead of [email protected]?). And (as a more minor concern) at sufficient scale, it could cause performance problems. I remember some webserver used to reverse-lookup IPs so it could log hostnames in its access log, and it was brought to its knees by even minimal levels of traffic).