Created
April 25, 2014 00:25
-
-
Save privatehosting/11274096 to your computer and use it in GitHub Desktop.
Nachfrage ob eMail Adresse Valide ist und ob der Mail Server auch in der Domain Eingetragen wurde.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function IsValideEmail($email) | |
{ | |
//$email = strtolower($email); ;; Groß und Kleinschreibung wird im eMail Verkehr berücksichtigt. | |
$return = false; | |
if(filter_var($email, FILTER_VALIDATE_EMAIL)) | |
{ | |
list($user, $host) = explode("@", $email); | |
if(checkdnsrr($host, "A") && checkdnsrr($host, "MX")) | |
{ | |
$return = true; | |
} | |
} | |
return $return; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment