PHP E-Mail Address Validation





14
Date Submitted Tue. Sep. 19th, 2006 7:11 PM
Revision 1 of 1
Helper RaX
Tags PHP
Comments 10 comments
This little function will split an e-mail address passed to it at the @ sign, and make sure that there is a valid e-mail server at the other end =)

//------------------------------------------------------------------------------------------------------
//VerifyEmailAddress($EMail)            VerifyEmailAddress($EMail)
//------------------------------------------------------------------------------------------------------
//      What it does-
//                  Verifies an e-mail address by splitting it at '@' and pinging the domain.
//
//      Changes -
//            August 4th, 2006 - RaX - Changed Split() to Explode() for speed.
//            August 3rd, 2006 - RaX - Created.
//
//------------------------------------------------------------------------------------------------------
function VerifyEmailAddress($EMail){
        list($User, $Domain) = explode("@", $EMail);
        $Result = checkdnsrr($Domain, 'MX');
        return($Result);
}
 

Robert Ditthardt

Comments

Comments very short
Thu. Sep. 21st, 2006 1:29 PM    Scripter bertheymans
Comments Just goes to show . . .
Thu. Sep. 21st, 2006 11:20 PM    Scripter sehrgut
Comments What if
Tue. Sep. 19th, 2006 7:54 PM    Helper jbplou
  Comments you r right
Mon. Sep. 25th, 2006 1:46 AM    Syntax Master sundaramkumar
  Comments Why a negative rating?
Tue. Sep. 19th, 2006 8:33 PM    Helper dohpaz
Comments no MX
Fri. Oct. 6th, 2006 7:38 AM    Helper BrandonReese
Comments CheckDNSRR for windows
Tue. Dec. 19th, 2006 3:40 PM    Helper RaX
Comments Works in Windows?
Tue. Apr. 10th, 2007 9:12 AM    Helper snowdonkey
Comments I Guess It Will
Tue. Apr. 10th, 2007 9:16 AM    Helper snowdonkey
Comments Well...
Mon. Sep. 3rd, 2007 8:46 PM    Helper RaX

Voting