I have a column of email addresses in a CSV file. I want to check if the email domain exist. I read the file using array as follow:
$domain = substr($arr[$line][$column], strpos($arr[$line][$column], '@') + 1); if (checkdnsrr($domain) !== FALSE){ echo $arr[$line][$column]. " --> Domain valid <br>"; }
The code works but how to ignore those lines which are empty in between? I get this line printed :
Warning: checkdnsrr(): Host cannot be empty in C:\xampp\htdocs\Trials\exist.php on line 18