Page 1 of 1

checkdnsrr not working

Posted: Fri Feb 16, 2007 3:49 pm
by patch2112
Hello all,

Has anyone ever heard of checkdnsrr not working for some reason? I have a simple validation script that works fine on my VPS, but validates any email address on my clients shared plan (linux).

Code: Select all

<?
function validate_email($email){
if(checkdnsrr(array_pop(explode("@",$email)),"MX")) { return true; }
else { return false; }
}

$email = "junk@jklasfdjklasfdjfjklsadfjklasdji.com";
if (validate_email($email)) { echo "passed"; } else { echo "failed"; }
//returns "passed"
?>
Thanks,
Philip