Email validation
am 28.06.2010 16:42:29 von gmail
------=_NextPart_000_0028_01CB16E0.E7015260
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hello to you all!
I'm facing a problem with a scrip that can validate a form witch accept only
as input email address.
I have seen many scripts on the net and were very interesting but I'm not
able to implement those scripts on my need.
I'm explaining myself better!
I have a form to collect a User Input Email address,
After a script to check the syntax of the user email is correct.
Then check the mx record if really exist.
At the end if the user input (email) meets all my requirements the pass it
(store) in a DB.
Please I'll be grateful to all your possible solutions
Thanks.
------=_NextPart_000_0028_01CB16E0.E7015260--
Re: Email validation
am 29.06.2010 13:58:08 von Richard Quadling
On 28 June 2010 15:42, gmail wrote:
> Hello to you all!
>
> I'm facing a problem with a scrip that can validate a form witch accept o=
nly
> as input email address.
>
> I have seen many scripts on the net and  were very interesting but I=
'm not
> able to implement those scripts on my need.
>
> Â I'm explaining myself better!
>
> I have a form to collect a User Input Email address,
>
> After a script to check the syntax of the user email is correct.
>
> Then check the mx record if really exist.
>
> At the end if the user input (email) meets all my requirements the pass i=
t
> (store) in a DB.
>
> Please I'll be grateful  to all your possible solutions
>
> Thanks.
>
>
>
>
How much detail do you want?
Validating email addresses goes from the mundane to the extreme. The
rules on the EXACT format of an email address are significant. Reading
http://en.wikipedia.org/wiki/E-mail_address#RFC_specificatio n will
give you a lot of detail.
There are MANY regular expressions available, again, covering some
aspects of a "valid" email address. Some cover more than others.
http://www.regular-expressions.info/email.html has a good explanation
regarding email address validation using regular expressions (and is
part of the RegexBuddy documentation).
Note the last line ...
"So even when following official standards, there are still trade-offs
to be made. Don't blindly copy regular expressions from online
libraries or discussion forums. Always test them on your own data and
with your own applications."
As for the MX part, PHP has the getmxrr() function for this task -
http://docs.php.net/manual/en/function.getmxrr.php
There are also a lot of user notes covering email address validation.
Richard.
--=20
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=3DZEND002498&r=3D213474=
731
ZOPA : http://uk.zopa.com/member/RQuadling
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Email validation
am 03.07.2010 23:53:53 von Manuel Lemos
Hello,
on 06/28/2010 11:42 AM gmail said the following:
> Hello to you all!
>
> I'm facing a problem with a scrip that can validate a form witch accept only
> as input email address.
>
> I have seen many scripts on the net and were very interesting but I'm not
> able to implement those scripts on my need.
>
> I'm explaining myself better!
>
> I have a form to collect a User Input Email address,
>
> After a script to check the syntax of the user email is correct.
>
> Then check the mx record if really exist.
>
> At the end if the user input (email) meets all my requirements the pass it
> (store) in a DB.
>
> Please I'll be grateful to all your possible solutions
You may want to use this email validation class that tries to check if
the e-mail is valid with the destination SMTP server.
http://www.phpclasses.org/emailvalidation
--
Regards,
Manuel Lemos
Find and post PHP jobs
http://www.phpclasses.org/jobs/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php