I have the following code which does not work... the checkdnsrr if statement always evaluates to FALSE. When I feed the checkdnsrr function a single email address, it works fine..
<?php
//emailverify.php
Include "common.inc";
html_header();
$emailfile = "./emailmerged.txt";
$fp = fopen ($emailfile, "r");
while (feof($fp) == FALSE) {
$email = fgets($fp, 200);
list ($username,$domain) = split ("@",$email);
if (checkdnsrr($domain) == TRUE) {
echo "MX record for $domain exists"; echo "<br>"; echo "<br>";
} else {
echo "MX record for $domain <b>does not</b> exist"; echo "<br>"; echo "<br>";
}
}
html_footer();
?>
Any suggestions?
Thanks,
--jb