K
Knut
Hey,
I'm building a small linkchecker ++ to do some maintanence on a
webserver I work with, but I have a problem.
At about check nr. 13, the program hangs when getting a website from
the web. (odin.dep.no/ud/norsk/aktuelt/taler/statsraad_b/032171-090195/index-dok000-b-n-a.html)
My procedure is as follows:
my $host="$_[0]";
my $getstring="GET http://$_[1] HTTP/1.0\n\n";
my $sock = new IO::Socket::INET(PeerAddr => $host, PeerPort => 80,
Proto => 'tcp') or print "ERRROR!!!";
print $sock "$getstring";
my $buf="";
while($line = <$sock>) {
$buf.=$line;
}
This works for the first few sites, but then hangs. Nothing seems to
get read by the buffer at all...
Can someone please help?
Thanks in advance!
.. Knut
I'm building a small linkchecker ++ to do some maintanence on a
webserver I work with, but I have a problem.
At about check nr. 13, the program hangs when getting a website from
the web. (odin.dep.no/ud/norsk/aktuelt/taler/statsraad_b/032171-090195/index-dok000-b-n-a.html)
My procedure is as follows:
my $host="$_[0]";
my $getstring="GET http://$_[1] HTTP/1.0\n\n";
my $sock = new IO::Socket::INET(PeerAddr => $host, PeerPort => 80,
Proto => 'tcp') or print "ERRROR!!!";
print $sock "$getstring";
my $buf="";
while($line = <$sock>) {
$buf.=$line;
}
This works for the first few sites, but then hangs. Nothing seems to
get read by the buffer at all...
Can someone please help?
Thanks in advance!
.. Knut