C
Cognition Peon
Hi,
I have followed the example in the perlfaq to automate
a post form submission:
#!/usr/bin/perl
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
$ua = LWP::UserAgent->new();
my $req = POST 'http://68.0.148.101:8055/login.html',
[ userid => 'File', password => 'pass'];
$content = $ua->request($req)->as_string;
HTML for the form is in the following file
http://68.0.148.101:8055/login.html
upon submission it must goto
http://68.0.148.101:8055/index.html
I am expecting the $content variable to have
the content of index.html but its getting login.html
I didn't find anybody who had similar problem.. and
its quite frustrating because it is a very simple
form submission page.
Thanks,
Prakash.
I have followed the example in the perlfaq to automate
a post form submission:
#!/usr/bin/perl
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
$ua = LWP::UserAgent->new();
my $req = POST 'http://68.0.148.101:8055/login.html',
[ userid => 'File', password => 'pass'];
$content = $ua->request($req)->as_string;
HTML for the form is in the following file
http://68.0.148.101:8055/login.html
upon submission it must goto
http://68.0.148.101:8055/index.html
I am expecting the $content variable to have
the content of index.html but its getting login.html
I didn't find anybody who had similar problem.. and
its quite frustrating because it is a very simple
form submission page.
Thanks,
Prakash.