$ips = inet_aton("$userips[$ipcontrol]");
$forward = gethostbyaddr($ips, AF_INET);
$reverselu = gethostbyname("$forward");
$reverse = inet_ntoa($reverselu) if ($reverselu);
my $revIP = join(".", reverse(split(/\./, $userips[$ipcontrol])));
$|=1;
print Dumper $query = $resolver->query("$revIP.in-addr.arpa.","PTR");
if ($query) {
foreach my $rr ($query->answer) {
next unless $rr->type eq "PTR";
print " ", $rr->ptrdname;
$ptr = $rr->ptrdname;
}
print "
";
}
else {
print " ", $resolver->errorstring, "\n";
$ptr = "NXDOMAIN";
print "
";
$testcondition = 1;
}
$|=0;