note 104078 deleted from function.checkdnsrr by danbrown
| From: | danbrown@php.net | Date: | Mon, 23 May 2011 15:12:37 +0000 |
| Subject: | note 104078 deleted from function.checkdnsrr by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-179976@lists.php.net to get a copy of this message | ||
Note Submitter: DDgroningen
----
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";
?>