PHPBuilder - international Emailchecker

RSS Twitter

international Emailchecker

by: Bernhard Bauder
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

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;


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

Comment and Contribute

Your comment has been submitted and is pending approval.

Bernhard Bauder



(Maximum characters: 1200). You have characters left.