This website send you a cookie
You can use something like that :

my $ua = LWP::UserAgent->new( agent => 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5 +.1; .NET CLR 1.1.4322)', cookie_jar => HTTP::Cookies->new( file => 'cookies.txt', autosave => 1, ignore_discard => 1 ) );

UPDATE
I tested the script and your problem comes from the ASP.NET_SessionId (see below)

#!/usr/bin/perl -w use strict; use LWP::UserAgent; use LWP::Debug qw(+); my $ua = LWP::UserAgent->new(); my $url = q{http://www.investway.com}; my @headers = ( 'User-Agent' => 'User-Agent=Mozilla/5.0 (X11; U; Linux x86_64; en- +US; rv:1.8.1.14) Gecko/20080404 Iceweasel/2.0.0.14 (Debian-2.0.0.14-2)', 'Accept-Language' => 'Accept-Language=en-us,en;q=0.5', 'Accept-Charset' => 'Accept-Charset=ISO-8859-1,utf-8;q=0.7,*;q=0. +7', 'Accept-Encoding' => 'Accept-Encoding=gzip,deflate', 'Accept' => "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, +image/png, */*", Cookie => 'ASP.NET_SessionId=l0gfoxzlneisjjfimjng23v1', ); my $res = $ua->get( $url, @headers ); if ( $res->is_success ) { print $res->headers_as_string, "\n"; } else { print $res->status_line . "\n"; Output: LWP::UserAgent::new: () LWP::UserAgent::request: () LWP::UserAgent::send_request: GET http://www.investway.com LWP::Protocol::http::request: () LWP::Protocol::collect: read 552 bytes LWP::Protocol::collect: read 570 bytes LWP::Protocol::collect: read 1368 bytes LWP::Protocol::collect: read 1368 bytes LWP::Protocol::collect: read 1368 bytes LWP::Protocol::collect: read 1368 bytes LWP::Protocol::collect: read 1368 bytes LWP::Protocol::collect: read 1368 bytes LWP::Protocol::collect: read 1368 bytes LWP::Protocol::collect: read 1368 bytes LWP::Protocol::collect: read 1368 bytes LWP::Protocol::collect: read 1368 bytes LWP::Protocol::collect: read 1368 bytes LWP::Protocol::collect: read 1368 bytes LWP::Protocol::collect: read 1368 bytes LWP::Protocol::collect: read 1028 bytes LWP::UserAgent::request: Simple response: OK Cache-Control: private Date: Tue, 29 Jul 2008 09:34:01 GMT Server: Microsoft-IIS/6.0 Content-Length: 19934 Content-Type: text/html; charset=utf-8 Client-Date: Tue, 29 Jul 2008 09:33:51 GMT Client-Peer: 10.154.68.6:8080 Client-Response-Num: 1 Link: <Includes/PropertyDetail.css>; /="/"; rel="stylesheet"; type="te +xt/css" Link: <Includes/thickbox.css>; /="/"; media="screen"; rel="stylesheet" +; type="text/css" Link: <Images/favicon.ico>; /="/"; rel="shortcut icon" Title: Investway X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET

hth,
PooLpi

'Ebry haffa hoe hab im tik a bush'. Jamaican proverb

In reply to Re: Trouble with LWP::UserAgent with certain website by poolpi
in thread Trouble with LWP::UserAgent with certain website by cketcham

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.