#!/usr/bin/perl -w
use IO::Socket;
unless (@ARGV > 1) { die "usage: $0 host document ..." }
$host = shift(@ARGV);
$EOL = "\015\012";
$BLANK = $EOL x 2;
foreach $document ( @ARGV ) {
$remote = IO::Socket::INET->new( Proto => "tcp",
PeerAddr => $host,
PeerPort => "http(80)",
);
unless ($remote) { die "cannot connect to http daemon on $host" }
$remote->autoflush(1);
print $remote "GET $document HTTP/1.0" . $BLANK;
while ( <$remote> ) { print }
close $remote;
}
See also:
| file: /Techref/language/perl/httpget.pl.htm, 0KB, , updated: 2001/3/29 12:47, local time: 2012/5/23 23:35,
38.107.179.232:LOG IN |
| ©2012 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/tecHREF/language/perl/httpget.pl.htm"> language perl httpget</A> |
| Did you find what you needed? |
|
o List host: MIT, Site host massmind.org, Top posters @20120523 RussellMc, IVP, alan.b.pearce, cdb, V G, Isaac Marino Bavaresco, Electron, John Gardner, Carl Denk, Dwayne Reid, * Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: None at this time. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
|
.