in reply to Alternatives to User::Agent?
Lizread (STDIN, $query, $ENV{'CONTENT_LENGTH'}); $query .= '&cmd=_notify-validate'; # set up connection and do the request my $socket = IO::Socket::INET->new( 'www.webserver.com:80' ) or die; print $socket "GET /cgi-bin/webscr?$query HTTP/1.0\n\n"; # check return status my $status = <$socket>; die "Unacceptable status: $status" unless $status =~ /200/; # lose the HTTP header while (<$socket>) { last if /^\s+$/s; } # get the body while (<$socket>) { $res .= $_; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Alternatives to User::Agent?
by meatpopsicl3 (Initiate) on Jul 21, 2003 at 22:42 UTC | |
by liz (Monsignor) on Jul 22, 2003 at 06:08 UTC |