Mitch has asked for the wisdom of the Perl Monks concerning the following question:
use IO::Socket; $socket=IO::Socket::INET->new( Proto => 'tcp', PeerAddr => 'www.nai.com', PeerPort => 'http(80)'); print "... $socket\n"; # http://www.nai.com/us/index.asp print $socket "GET /us/index.asp HTTP/1.0"; open (OUT, ">out.txt"); while (<$socket>) { print OUT; } close (OUT); close $socket;
The output I get is...<br><br> HTTP/1.0 408 Request Time-out Server: AkamaiGHost Mime-Version: 1.0 Date: Mon, 07 Jul 2003 14:54:57 GMT Content-Type: text/html Content-Length: 163 Expires: Mon, 07 Jul 2003 14:54:57 GMT <HTML><HEAD> <TITLE>Request Timeout</TITLE> </HEAD><BODY> <H1>Request Timeout</H1> The server timed out while waiting for the browser's request.<P> </BODY></HTML>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Web Page - IO::Sockets
by gellyfish (Monsignor) on Jul 07, 2003 at 15:24 UTC | |
by Mitch (Sexton) on Jul 07, 2003 at 15:45 UTC |