1 #!/local/perl/bin/perl -w
4 $url = url
(shift) || die "Usage: $0 <url>\n";
6 require WWW
::RobotRules
::AnyDBM_File
;
9 $botname = "Spider/0.1";
11 $rules = new WWW
::RobotRules
::AnyDBM_File
$botname, 'robotdb';
12 $ua = new LWP
::RobotUA
$botname, 'gisle@aas.no', $rules;
15 my $req = new HTTP
::Request GET
=> $url;
17 my $res = $ua->request($req);
18 print "Got ", $res->code, " ", $res->message, "(", $res->content_type, ")\n";
20 my $netloc = $url->netloc;
21 print "This was visit no ", $ua->no_visits($netloc), " to $netloc\n";