note 104078 modified in function.checkdnsrr by thiago
| From: | thiago@php.net | Date: | Mon, 23 May 2011 14:21:17 +0000 |
| Subject: | note 104078 modified in function.checkdnsrr by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-179972@lists.php.net to get a copy of this message | ||
If you use the DNS 8.8.8.8 from Google on your server and check if the domain is right, you get by
"google domains" strange answers. Only "gmail" is not correct domain without
extention but Google DNS give Found back.
I think they use local names on there DNS servers!
<?php
$domain = 'gmail';
if(( !checkdnsrr( $domain, "MX" ) && !checkdnsrr( $domain, "A" )))
echo "Not Found";
else
echo "Found";
?>
--was--
If you use the DNS 8.8.8.8 from Google on your server and check if the domain is right, you get by
"google domains" strange answers. Only "gmail" is not correct domain without
extention but Google DNS give Found back.
I think they use local names on there DNS servers!
$domain = 'gmail';
if(( !checkdnsrr( $domain, "MX" ) && !checkdnsrr( $domain, "A" )))
echo "Not Found";
else
echo "Found";
http://php.net/manual/en/function.checkdnsrr.php