Here is what I have so far
function email_valid($fieldname){
$field_errors = array();
if (!preg_match('/^([a-zA-Z0-9]+)([a-zA-Z0-9\._-]*)@([a-zA-Z0-9_-]+)([a-zA-Z0-9\._-]+)+$/' , $fieldname)){
$field_errors[] = $fieldname . " is not a valid email";
}else {
list($userName, $mailDomain) = split("@", $fieldname);
if (dns_check_record($mailDomain, "MX")){
$field_errors[] = $mailDomain . " is not a real Domain";
}
}
return $field_errors;
}
However dns check record, getmxrr, and checkdnsrr I have tried and none works I get the error invalid function being called and did not know what it was until I found out these do not work on a Windows platform. I need one that will work on all platforms. Can someone help me here?