Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Use LWP::UserAgent to go to a password protected ASP page

by sanPerl (Friar)
on Aug 10, 2005 at 09:13 UTC ( #482548=note: print w/replies, xml ) Need Help??


in reply to Use LWP::UserAgent to go to a password protected ASP page

PLease check if this can help you
=======================================
use strict;<br> use WWW::Mechanize;<br> my $username = "USER"; # Login<br> my $password = "PASSWORD"; # Password<br> my $url = "http://www.myurl.com"; # Your URL Name<br> my $mech = WWW::Mechanize->new();<br> $mech->get($url);<br> ## Browse the HTML source of the ASP page to get these parameters <br> $mech->form("form_Name"); # The Login Form Name<br> $mech->field("txt_id", $username); # Username Texbox name<br> $mech->field("txt_pwd", $password); # Password Textbox name<br> $mech->click("cmd_ok"); # Button name<br> my $current_site = $mech->{uri}; #The $current_site would give you the address of next page...
- SanPerl

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://482548]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2020-05-30 19:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (173 votes). Check out past polls.

    Notices?