Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
autosubmit login and capture result
i'm looking to run this simple program ( on a different url - which happens to be a login page ). I pass in a valid login & pw, but the content is that of the login page, not the page i'm redirected to when I submit the same info from a browser. please help..
use HTTP::Request::Common qw(POST);
$ua = LWP::UserAgent->new();
my $req = POST 'http://www.perl.com/cgi-bin/cpan_mod'
[ module => 'DB_File', readme => 1 ];
$content = $ua->request($req)->as_string;
print "content: $content
0 · ·