I have been trying to use to log into the webpage
but have not had much luck. All that happens when I print out the urls I am at is it prints the initial login page. This is the code i'm using. Can anyone spot a bug or help me out? I tried it using credentials and submit.
#!c:\perl\bin\perl
use Net::FTP;
use File::Copy;
use CWD;
use File::stat;
use Time::localtime;
use LWP::Simple;
use HTML::LinkExtor;
use Data:umper;
use use File::Basename;
$count=1;
my $mech = $mech->credentials( '****' => '*****' );
$mech->get("link2me.com/index.cgimenu=loginrefresh");
print $mech->uri,"\n";
my $url = $mech->uri;
$content = get($url) || die "get: $!";
open (OVERWRITE, ">link_2_me_$count.htm") or die "$! error trying to overwrite";
print OVERWRITE $content;
$password="****";
$usrname="****"
$mech->set_visible( $usrname, $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;
Thanks
Scott
but have not had much luck. All that happens when I print out the urls I am at is it prints the initial login page. This is the code i'm using. Can anyone spot a bug or help me out? I tried it using credentials and submit.
#!c:\perl\bin\perl
use Net::FTP;
use File::Copy;
use CWD;
use File::stat;
use Time::localtime;
use LWP::Simple;
use HTML::LinkExtor;
use Data:umper;
use use File::Basename;
$count=1;
my $mech = $mech->credentials( '****' => '*****' );
$mech->get("link2me.com/index.cgimenu=loginrefresh");
print $mech->uri,"\n";
my $url = $mech->uri;
$content = get($url) || die "get: $!";
open (OVERWRITE, ">link_2_me_$count.htm") or die "$! error trying to overwrite";
print OVERWRITE $content;
$password="****";
$usrname="****"
$mech->set_visible( $usrname, $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;
Thanks
Scott