DNS Connection Question
Bob Gorman
bob at rsi.com
Wed Oct 20 13:31:01 EDT 2004
At 12:02 PM 10/20/2004, trlists at clayst.com wrote:
>For Bob G, the PHP functions (checkdnsrr() or, in PHP 5,
>dns_get_record()) won't work for this purpose as they do not allow you
>to specify the server, only the host to look up. As a result I'd have
>to use the socket functions, so just invoking dig may be the best
>solution.
Doing a shell exec to host or dig is a very doable. Go for it.
Also there is Net_DNS. Peaking in the code reveals it uses fsockopen() and reimplements the DNS protocol(s). You can use it under PEAR, or just shred the code to your liking, LGPL.
http://pear.php.net/package/Net_DNS
There are probably more code snippets out there, but that's enough hunting for today.
Happy coding!
More information about the Discuss
mailing list