I'm using the following PERL code to do some DNS queries. Anyone know how to
specify what "dns or nameserver" to use instead of what is in
/etc/resolv.conf (unix)? Or is there a better way in PERL?

MAIN:
{
    use Socket;

    # Get Server IP Address of domain name
    $host=gethostbyname($domainname);
    $ipaddr=join('.', unpack('C4', $host));

    # Get Server's primary domain name
    ($a,$b,$c,$d)=split(/\./, $ipaddr);
    $dnsname=pack('C4',($a,$b,$c,$d));
    ($dnsname,$a,$b,$c,$d)=gethostbyaddr($dnsname, AF_INET);

??? validate from some other name server ???

Thanks,
Glen



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to