Last active
August 29, 2015 14:27
-
-
Save AlexTape/f30a8c7cd6c19c63c25b to your computer and use it in GitHub Desktop.
Perl Mechanize Webpage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment