N
noone
Hi,
Anyone know how a Perl script can log onto Rakuten?
Here is what I do in my script:
$ua = LWP::UserAgent->new(
'agent' => $agent,
'cookie_jar' => {file => "cookies.txt", autosave => 1, ignore_discard => 1},
'requests_redirectable' => ['GET', 'HEAD', 'POST']
);
$request = HTTP::Request->new(POST => 'https://grp02.id.rakuten.co.jp/rms/nid/login');
$request->content_type('application/x-www-form-urlencoded');
$request->content('service_id=59&return_url=index.phtml%3F&u=mylogin&p=mypassword&auto_logout=true');
$response = $ua->request($request);
if (!$response->is_success) {
die $response->status_line;
}
After the $response->content indicates I am logged in, and the cookies
seems to be well set. But then when I access another url in Rakuten, it
has forgotten I am logged in! It is of course not the expected behaviour.
And it is not what happen with Mozilla or Internet Explorer.
Thanks for any help,
David.
Anyone know how a Perl script can log onto Rakuten?
Here is what I do in my script:
$ua = LWP::UserAgent->new(
'agent' => $agent,
'cookie_jar' => {file => "cookies.txt", autosave => 1, ignore_discard => 1},
'requests_redirectable' => ['GET', 'HEAD', 'POST']
);
$request = HTTP::Request->new(POST => 'https://grp02.id.rakuten.co.jp/rms/nid/login');
$request->content_type('application/x-www-form-urlencoded');
$request->content('service_id=59&return_url=index.phtml%3F&u=mylogin&p=mypassword&auto_logout=true');
$response = $ua->request($request);
if (!$response->is_success) {
die $response->status_line;
}
After the $response->content indicates I am logged in, and the cookies
seems to be well set. But then when I access another url in Rakuten, it
has forgotten I am logged in! It is of course not the expected behaviour.
And it is not what happen with Mozilla or Internet Explorer.
Thanks for any help,
David.