hi. thanks in advance for any help!
i'm trying to make the email_valid function that i found on php.net
work.
i can get it to validate the email formatting, but it always fails on
the MX check and the DNS check.
any ideas??? thanks! please cc [EMAIL PROTECTED] with any answers

 function valid_email ($email) {
  if
(eregi("^[0-9a-z_]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$",
$email,$check)) {
   echo "passed formatting test. ";
   if ( getmxrr(substr(strstr($check[0], '@'), 1), $validate_email_temp)
) {
    echo "passed getmxrr test. ";
             return TRUE;
    }
    // THIS WILL CATCH DNSs THAT ARE NOT MX.
    if(checkdnsrr(substr(strstr($check[0], '@'), 1),"ANY")){
        echo "passed dns check";
        return TRUE;
    }
  }
    echo "FALSE<BR>";
    return FALSE;
    }


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to