W
wqhflp
To access some websites, not only the username/pwd is need, but also a
field need to fill based on a randomly generated digitals/letters on an
image(this will prevent the automatically account creating, such as
when creating the MSN account, the website will ask us to fill that
kind of data).
When I first accessed the website using firefox or IE, I must fill the
username/pwd and that kind of field. And if I close the browser and
open it a second time to view the same website, there is no need for me
to fill username/pwd which means firefox/IE can use the cookie to
access it. And I tried to use the cookie using be IE by model
HTTP::Cookies::Microsoft in the code, but the response from the web
server still can NOT recogize that I already logged in.
my $cookie_jar = HTTP::Cookies::Microsoft->new(
file => "$cookies_dir\\index.dat",
'delayload' => 0,
);
my $mech=WWW::Mechanize->new(cookie_jar=>$cookie_jar);
$mech->get("http://bbs1.21our.com/");
$mech->cookie_jar($cookie_jar);
die "Can't evan get the home pages" unless $mech->success;
my $output_page=$mech->content();
field need to fill based on a randomly generated digitals/letters on an
image(this will prevent the automatically account creating, such as
when creating the MSN account, the website will ask us to fill that
kind of data).
When I first accessed the website using firefox or IE, I must fill the
username/pwd and that kind of field. And if I close the browser and
open it a second time to view the same website, there is no need for me
to fill username/pwd which means firefox/IE can use the cookie to
access it. And I tried to use the cookie using be IE by model
HTTP::Cookies::Microsoft in the code, but the response from the web
server still can NOT recogize that I already logged in.
my $cookie_jar = HTTP::Cookies::Microsoft->new(
file => "$cookies_dir\\index.dat",
'delayload' => 0,
);
my $mech=WWW::Mechanize->new(cookie_jar=>$cookie_jar);
$mech->get("http://bbs1.21our.com/");
$mech->cookie_jar($cookie_jar);
die "Can't evan get the home pages" unless $mech->success;
my $output_page=$mech->content();