Which is not what I want. Any ideas why I am getting this rather than an html page??use WWW::Mechanize; use HTTP::Cookies; my $outfile = "out.htm"; my $url = "***************"; my $username = "**********"; my $password = "********"; my $mech = WWW::Mechanize->new(); my $number = 2; $mech->cookie_jar(HTTP::Cookies->new()); $mech->get($url); my @names = $mech->forms(); #print @names; #mech->form_id( $name ); $mech->form_name('login_form'); #$mech->form_number($number); $mech->field(USER => $username); $mech->field(PASSWORD => $password); $mech->submit(); my $output_page = $mech->content(); print $output_page; @links = $mech->find_all_links(); foreach (@links) { print $_->url(), "\n"; print $_->text(), "\n"; print $_->name(), "\n"; print $_->tag(), "\n"; } This gives::: <!-- --> <script language="Javascript"> loc = document.URL; begin_target = loc.indexOf("TARGET="); end_target = loc.length; target = loc.substring(begin_target + 7,end_target); target = target.replace(":80",""); target = target.replace('$SM$', ''); end_site = target.indexOf('/',10); site = target.substring(0,end_site); if(end_site == -1) { end_site = target.indexOf('%2f',16); } site = target.substring(0,end_site); while( (site.indexOf('%3a')) != -1) { site = site.replace('%3a', ':'); } while( (site.indexOf('%2f')) != -1) { site = site.replace('%2f', '/'); } while( (site.indexOf('%2e')) != -1) { site = site.replace('%2e', '.'); } document.location.href = site + "/?DEST=" + target; </script>
In reply to form logins by everlast88az
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |