in reply to Alternatives to User::Agent?

If you're not stuck to having to use POST (but instead use GET), then it could be as simple as:
read (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 .= $_; }
Liz

Replies are listed 'Best First'.
Re: Re: Alternatives to User::Agent?
by meatpopsicl3 (Initiate) on Jul 21, 2003 at 22:42 UTC
    I would have to first load IO::Socket::INET, right? would this be:
    use IO::Socket::INET;
      use IO::Socket;
      should be enough, I believe.

      Liz