use strict; use warnings; use CGI; use Net::Whois::Raw; use Net::Whois::ARIN; my $q = new CGI; my $domname = $q->param("domname"); my $ip = $q->param('ip'); print "content-type:text/plain; charset=utf-8\n\n"; if (!$domname) { print ""; } else { my $text = get_whois($domname, undef, "QRY_LAST"); print $text; } my $w = Net::Whois::ARIN->new( host => 'whois.arin.net', port => 43, timeout => 30, ); if (!$ip) { print ""; } else { my @records = $w->network($ip); foreach my $net (@records) { # print ...; } } #### use strict; use warnings; use CGI; use Net::Whois::Raw; use Net::Whois::ARIN; my $w = Net::Whois::ARIN->new( host => 'whois.arin.net', port => 43, timeout => 30, ); my $q = new CGI; my $server = $q->param("server"); print "content-type:text/plain; charset=utf-8\n\n"; if($server and $server ne "") { print "get_whois says:\n"; print get_whois($server, undef, "QRY_LAST"); print "\n\n"; print "ARIN says:\n"; my $output = $w->query("n + $server"); print "$output\n"; } else { print "No server\n"; }