Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Can s.o. help me with some hints. I thank you very much for your effort, Carl (Carl.Schreiber@chello.at)use HTTP::Request::Common; use HTML::Form; use LWP::UserAgent; use LWP::Debug qw(+); BEGIN { *LWP::UserAgent::redirect_ok = sub {1} } use HTTP::Cookies; use File::Basename; $cookie = '/home/../cookie_jar.txt'; print unlink $cookie; $ua = LWP::UserAgent->new; $ua->cookie_jar( HTTP::Cookies->new( file => "$cookie", autosave => 1 ) ); $ua->agent('Mozilla/4.73');$c=0; # tried: file:///, file://, file:/, /myForm ... $req = HTTP::Request->new(GET => 'file:/home/../myForm.html'); # Pass request to the user agent and get a response back $res = $ua->request($req); #tried various forms of: $res = $ua->request(GET 'file:///home/../myF +orm.html'); # execution is interrupted here. $form = HTML::Form->parse( $res->content); $res = $ua->request( $form->click ); # Check the outcome of the response if ($res->is_success) { print $res->content; } else { print "Bad luck this time\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to get a local form to be 'clicked'?
by Joost (Canon) on Jun 05, 2002 at 16:47 UTC | |
by Anonymous Monk on Jun 06, 2002 at 08:10 UTC | |
by Joost (Canon) on Jun 06, 2002 at 08:40 UTC | |
by Anonymous Monk on Jun 06, 2002 at 08:43 UTC | |
|
Re: How to get a local form to be 'clicked'?
by thraxil (Prior) on Jun 05, 2002 at 15:47 UTC |