Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w ### Create a socket to read the pages from ISJ use IO::Socket; $sock = new IO::Socket::INET ( PeerAddr => 'www.somewhere.com', PeerPort => 80, Proto => 'tcp', Timeout => 10, ); die "Socket could not be created $!\n" unless $sock; open ( URLforSoc, "$FileCon" ) or die "Cant open the file for readi +ng!!!"; while ( <URLforSoc> ) { print $sock "GET ${URL_VAL} HTTP /1.0\n\n"; while($line = <$sock>) { print "$line"; } $sock->flush(); } close ($sock); exit 0;
Title edit by tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sockets
by rjray (Chaplain) on Mar 20, 2003 at 03:11 UTC | |
|
Re: sockets
by pg (Canon) on Mar 20, 2003 at 06:01 UTC | |
|
Re: sockets
by Zaxo (Archbishop) on Mar 20, 2003 at 02:54 UTC | |
by Anonymous Monk on Mar 20, 2003 at 02:59 UTC | |
|
Re: socket won't let me fetch multiple web pages (HTTP v1.1)
by tye (Sage) on Mar 20, 2003 at 15:45 UTC |