bah
#!/she/bang
use Socket;
my $domain = "something.com";
my $port = "80";
my $file = "/path/to/file/or/full/url.html";
my $sockaddr = sockaddr_in $port, inet_aton $domain or die "Bad hostname\n";
socket SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp') or die "Bad socket\n";
connect SOCK, $sockaddr or die "Bad connection\n";
select((select(SOCK), $| = 1)[0]);
print SOCK "GET $file HTTP/1.1\n";
#uhh.. this is how i get rid of headers.. just for reference..
#while (<SOCK>) { /^Content/ and last; }
my $source;
while (<SOCK>) { print; }
close SOCK;
no LWP! socket comes with the perl package.. so you don't need to install anything to use this
Jerry Su http://www.jsu07.com