From: "Earthlink-m_ryan" <[EMAIL PROTECTED]>
> I'm sending a request to an usoft IIS server running colfusion scripts
> and am having trouble getting my useragent to establish a session with
> the host. i recieve a timed out or session not established 500 server
> error from the host. does anyone know how to establish this kind of
> session?
>
> This is the script I have been hacking with -
>
> #! /usr/bin/perl -w
>
> use LWP::UserAgent;
>
> $ua1 = LWP::UserAgent->new(requests_redirectable =>
> ['POST','GET','HEAD']);
> my $hdrs = HTTP::Headers->new();
> my $req = HTTP::Request->new(POST ,
> 'http://www.dpor.state.va.us/regulantlookup/selection_input.cfm' ,
> $hdrs); my $resp = $ua1->request($req); my
> $rresp=$resp->as_string;
> ...
Your $ua1 has to accept cookies.
Add something like
$ua1->cookie_jar({});
after the $ua1 creation.
Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>