I'm trying to complete e script wich checks if a domain exists. But... it seems it doesn't work always, sometimes the domain exists but the script says that it doesn't.
list ($alias, $domain) = split ('[@]', $email);
$domain1= "www.".$domain;
$domain2= "smtp.".$domain;
$domain3= "mail.".$domain;
$domain4= "pop.".$domain;
$domain5= "mx.".$domain;
$check1=@fsockopen($domain1, 80, $errno, $errstr, 5);
if (!$check1) {
$check2=@fsockopen($domain2, 80, $errno, $errstr, 5);
$check3=@fsockopen($domain3, 80, $errno, $errstr, 5);
$check4=@fsockopen($domain4, 80, $errno, $errstr, 5);
$check5=@fsockopen($domain5, 80, $errno, $errstr, 5);
if (!$check3 and !$check2 and !$check4 and !$check5) {
echo "THE DOMAIN DOES NOT EXIST";
}}