note 19508 deleted from function.checkdnsrr by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 09:00:52 +0000 |
| Subject: | note 19508 deleted from function.checkdnsrr by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-196821@lists.php.net to get a copy of this message | ||
Note Submitter: alex at xela dot co dot uk
----
Hi,
Interesting thing I've discovered regarding checkdnsrr. When querying a domain's status
using the command, always append a dot to the end of the domain you are querying. I.e.
<?php
checkdnsrr($domain.'.')
?>
The dot is sometimes necessary if you are searching for a fully qualified domain which has the same
name as a host on your local domain.. ie :-
You want to search for "our.info"
and you happen to have a node on your domain called :
our.info.ourdomain.com
If your DNS server is told to check 'ourdomain.com' before any other you will get a
positive result when in fact our.info might not exist.
For this reason adding the dot enforces the root. Of course the dot does not alter results that were
OK anyway.
Hope that helps some poor confused people :o)
Alex.