#native_company# #native_desc#
#native_cta#

international Emailchecker

By Bernhard Bauder
on August 29, 2002

Version: 1.5

Type: Function

Category: Algorithms

License: GNU General Public License

Description: This functions checks if is an Email an valid international Emailaddress.

More Information at http://www.php-resource.de

function checkmail($email) {
	if (eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*.([a-z]{2}|com|edu|gov|int|mil|net|org|shop|aero|biz|coop|info|museum|name|pro)$", $email, $check)) { 
		if(getmxrr(substr(strstr($check[0], '@'), 1), $validate_email_temp)) { 
			return true;
			}
		if(checkdnsrr(substr(strstr($check[0], '@'), 1),"ANY")){
			return true;
			}
		}
	return false;
	}


$check=checkmail("[email protected]");

if (!$check) echo "Error"; else echo "ok";