Hello,
I am trying to login a passworded webpage. The loging form for the webpage is
I have been trying to login using the script
but have not had any luck. It always kicks me out to the error logging in page. Any suggestions on how I can change my script to log in?
Thanks
Scott
I am trying to login a passworded webpage. The loging form for the webpage is
Code:
<form id="form1" name="form1" method="post" action="[URL unfurl="true"]http://www.linkalizer.com/login.php?fn=http://www.linkalizer.com/welcome.php">[/URL]
<p><strong><br />
Login </strong>username
<input name="user_box" type="text" id="user_box" />
password
<input name="pass" type="password" id="pass" />
<input type="submit" name="Submit" value="Go >" />
<br />
<a href="[URL unfurl="true"]http://www.linkalizer.com/pass_forgot.php">Forgot[/URL] password</a></p>
</form>
I have been trying to login using the script
Code:
$mech->get("[URL unfurl="true"]http://www.linkalizer.com/welcome.php");[/URL]
## Log in.
$mech->set_fields(
user_box => 'username@user.com',
pass => 'password',
);
$mech->submit();
print $mech->uri;
my $url = $mech->uri;
$content = get($url) || die "get: $!";
$count++;
open (OVERWRITE, ">link_2_me_$count.htm") or die "$! error trying to overwrite";
print OVERWRITE $content;
but have not had any luck. It always kicks me out to the error logging in page. Any suggestions on how I can change my script to log in?
Thanks
Scott