note 19508 modified in function.checkdnsrr by vrana
| From: | vrana@php.net | Date: | Tue, 17 Aug 2004 14:54:16 +0000 |
| Subject: | note 19508 modified in function.checkdnsrr by vrana | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-79968@lists.php.net to get a copy of this message | ||
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.
--was--
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.
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.
http://php.net/manual/en/function.checkdnsrr.php