I recorded my session using livehttpheaders in Firefox. I'm trying to automate this report using LWP.

When I go to authenticate, I get this unreadable text as a response:

HTTP/1.1 200 OK Connection: close Date: Wed, 06 Oct 2010 22:22:12 GMT Server: Apache/2.2.3 (CentOS) Vary: Accept-Encoding Content-Length: 84 Content-Type: text/html; charset=ISO-8859-1 Client-Date: Wed, 06 Oct 2010 22:19:52 GMT Client-Peer: 174.129.240.62:80 Client-Response-Num: 1 X-Powered-By: PHP/5.2.4
☻ [#←ª£│╔(╔═▒│I╩O®┤│╔0▓♂,M-¬H,J╠M-I-Rp-*╩/*ÂÐJ┘¶Ïyµò%µdª(♦º▬↨gµþ┘Þ↨Ï┘ÞC¶Ûâ

Basically a bunch of random characters that aren't part of that character set. I don't think they'll show up properly.

Can anyone give me any insight? It returns a HTTP 200 response and content-type: text/html, so I don't get why it's returning this odd output.

Here's the relevant code with the username and password removed:

my $t = time(); my $resp = $ua->get("https://www.foreclosureradar.com/webservices/auth +enticate.php?Verb=GET&Domain=foreclosureradar&Password=mypass&Version +=2.2&Login=mylogin&t=$t"); print $resp->as_string . "\n";

I'm very stuck and any help would be much appreciated. Thanks!!


In reply to LWP HTTP response is unreadable by Chewy2426

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.