$tempfileone = "/var/www/cgi-bin/logs/ipsectest/iptestscript$userips[$ipcontrol].txt";
$urlone = "http://notgivingthesite/cgi-bin/block-lookup\?$userips[$ipcontrol]";
$mechone = WWW::Mechanize->new();
print Dumper $mechone->get( $urlone, ':content_file' => $tempfileone );
####
$VAR1 = bless( {
'_content' => '500 Can\'t connect to notgivingthesite:80 (Bad hostname \'notgivingthesite\')
',
'_rc' => 500,
'_headers' => bless( {
'client-warning' => 'Internal response',
'client-date' => 'Wed, 08 Apr 2009 13:34:36 GMT',
'content-type' => 'text/plain'
}, 'HTTP::Headers' ),
'_msg' => 'Can\'t connect to notgivingthesite:80 (Bad hostname \'notgivingthesite\')',
'_request' => bless( {
'_content' => '',
'_uri' => bless( do{\(my $o = 'http://notgivingthesite/cgi-bin/block-lookup?209.18.32.55')}, 'URI::http' ),
'_headers' => bless( {
'user-agent' => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)',
'accept-encoding' => 'gzip'
}, 'HTTP::Headers' ),
'_method' => 'GET',
'_uri_canonical' => $VAR1->{'_request'}{'_uri'}
}, 'HTTP::Request' )
}, 'HTTP::Response' );
$VAR1 = undef;
####
$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;
####
could not get socket