You might need to fake the browser too, at my banking site I can more or less only access with Internet explorer, but if I tell Opera to pretend to be "Internet Explorer", it all works well. I see you do this:

$ua->agent("Mozilla/8.0"); # pretend we are very capable browser

This might very well be overdoing it, by pretending to be this "very capable browser", you are also pretending to be a non-existing browser, at least as far as the site is concerned. Lots of poorly written controls, both in javascript and in server-side code doesn't really check if your browser can handle what it needs to, only if it is "the most common one(s)". This is of course, the easy way out for lazy (false laziness) programmers, and it will almost always come back to haunt them or whoever gets to maintain the code.

I'd suggest that you copy the User-Agent header verbatim from a browser that you know works on that site, such as (most likely) Mozilla/4.0 (compatible; MSIE 5.5; Windows 98) - even if you rather want to be the meanest browser on the block :)


In reply to More forging: by Dog and Pony
in thread LWP and Javascript by tonyday

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.