Hi,
I want to login somewhere to get the state of my account.
The address of this acct.-page is just
https://myaccount.server.com/clx/index.php?part=menu&justloggedin=true
I use WWW::Mechanize, but I end up at a page with
<meta http-equiv="Refresh" content="0;url=index.php?part=menu&justloggedin=true">
Now I either loose the session, or I just reload exatly this page.
How, the hell, can I go beyond this page, which shows I am successfully logged in
  use WWW::Mechanize;     my $m = WWW::Mechanize->new( agent => 'Linux Konqueror' );     $m->get( $url );     $r = $m->success or die "Can't get this url $url\n\n";     # login-Page is loaded ..     my $r = $m->submit_form(         fields      => {             $uFld    => $uNme,             $pFld    => $pPwd         }     );     die "Couldn't submit form" unless $r->is_success;     # Login was successfull here print $r->content # prints this #<html><head> #<meta http-equiv="Refresh" #content="0;url=index.php?part=menu&justloggedin=true"> #</head><body><a #href="index.php?part=menu&justloggedin=true"></a></body></html>
If I do these I loose the session (need to re-login):
$m->follow_link(n=>0); $m->follow_link(n=>1);
If I try to create the url by my self by
Step 1:
print join('; ',@{${$m->links()}[0]}),"\n\n"; print join('; ',@{${$m->links()}[1]}),"\n";
this gives me:
index.php?part=menu&justloggedin=true; ; ; meta; https://myaccount.ser +ver.com/clx/index.php; HASH(0x864c5f8) index.php?part=menu&justloggedin=true; ; ; a; https://myaccount.server +.com/clx/index.php; HASH(0x86168bc)
So I just try:
$m->get( 'https://myaccount.server.com/clx/index.php?part=menu&justlog +gedin=true' )
and the session is lost => re-login

And even what I have found on Active bugs for WWW-Mechanize (http://rt.cpan.org/Public/Bug/Display.html?id=12882)

print $m->response->request->uri;
shows: https://myaccount.server.com/clx/index.php
and that only reloads the first login-form and not what I want.

If I do a reload after submitting the form,
$m->reload();
I just reload meta="Refresh.. page


Anybody with an idea how I can get beyond this "meta-page"?

Thanks a lot in advance;
Carl


In reply to meta="Refresh" by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.