Moi , j'utilise ceci en PHP
public static function checkemail($email)
{
// see http://www.devshed.com/c/a/PHP/Email-Address-Verification-with-PHP/2/
// checks proper syntax
if (!preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/" , $email))
{
return false;
}
//DEBUG NO NETWORK
//return true;
// gets domain name
list($username,$domain)=split('@',$email);
// checks for if MX records in the DNS
$mxhosts = array();
if(!@getmxrr($domain, $mxhosts)) {
// no mx records, ok to check domain
if (!@fsockopen($domain,25,$errno,$errstr,30)) {
return false;
} else {
return true;
}
} else {
// mx records found
foreach (@$mxhosts as $host) {
if (@fsockopen($host,25,$errno,$errstr,30)) {
return true;
}
}
return false;
}
}
Gates gave you the windows.
GNU gave us the whole house.(Alexandrin)