checkdnsrr, gethostbyaddr / PHP4
| From: | Philipp Gaschütz | Date: | Tue, 06 Jun 2000 19:12:19 +0000 |
| Subject: | checkdnsrr, gethostbyaddr / PHP4 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-1140@lists.php.net to get a copy of this message | ||
hey all!
I recently upgraded to PHP4 / Apache 1.3.12 .
I have a PHP script that does reverse lookups on IPs. A couple of thouse
IPs do _not_ have a reverse entry.
For those IPs with reverse entry, gethostbyaddr worked fine. However, for
those without reverse entry, PHP prints out a warning saying "Warning:
...could not lookup [bla bla]"
I couldnt find a way to turn it off.
I then assumed the function would have changed from PHP3 to 4. So I added
a line:
if(checkdnsrr("xxx.xxx.xxx.xxx","ANY") gethostbyaddr(.....
in the hope that this would turn off the warnings... wrong! checkdnsrr
doesnt do anything on IPs?!?!? it works for hostnames though?!
Am I missing something? Is this a bug?
Thanks for any comments or help!
-philipp