Thanks for the info Martin.  I've still had no luck.  Here is what I've
tried:

1) Tried setting the header to:
$myUserAgent->agent('Mozilla/4.76 [en] (Win98; U)');

2) Tried setting the header to:
$myUserAgent->agent('Mozilla compatible MSIE 5.5');

3) Tried a "get" instead of a "request" with the following header
($configSettings{"login"} contains my URL):
my @netscapeLikeHeader = (
                          'User-Agent' => 'Mozilla/4.76 [en] (Win98; U)',
                          'Accept-Language' => 'en-US',
                          'Accept-Charset' => 'iso-8859-1,*,utf-8',
                          'Accept-Encoding' => 'gzip',
                          'Accept' => "image/gif, image/x-xbitmap,
image/jpeg, image/pjpeg, image/png, */*",);
$myRequest = $myUserAgent->get($configSettings{"login"},
@netscapeLikeHeader);

Any ideas?  Thanks,
Kenny


----- Original Message -----
From: "Thurn, Martin (Intranet)" <[EMAIL PROTECTED]>
To: "Kenny G. Dubuisson, Jr." <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, July 31, 2002 8:35 AM
Subject: RE: Accessing a login page via LWP


> in "Perl & LWP", look up "browsers" in the index.
> Leads you to "user agents", which has a sub-listing "imitating others" on
> page 170.
> If you don't know the exact agent_name for MSIE, try adding stuff like
> 'Mozilla compatible MSIE 5.5' to the agent name.
>
> --
>  - - Kingpin
>
>
> > -----Original Message-----
> > From: Kenny G. Dubuisson, Jr. [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 31, 2002 08:07
> > To: [EMAIL PROTECTED]
> > Subject: Accessing a login page via LWP
> >
> >
> > .  2) Already bought
> > the book PERl & LWP.  It is a very good book but I can't find a
> > definiative answer on how to "emulate" an IE browser request.

Couple of things to note:  1) yes there was a typo in my quote of the
original code; they curly brace should not be there.  2) Already bought the
book PERl & LWP.  It is a very good book but I can't find a definiative
answer on how to "emulate" an IE browser request.

Here is the actual code again (note that the URL should have quotes around
it but Outlook replaced them with a hyperlink in this email message).  As
previously stated, it fetches the login FAQ instead of the login page that I
want.  If I use IE to fetch the same URL, I get the login page.

# Structure the HTTP request.
$myUserAgent = LWP::UserAgent->new;
$myUserAgent->agent("Automation/0.1");
$myUserAgent->cookie_jar(HTTP::Cookies->new(autosave => 1));

# Get the login page.
$myRequest = $myUserAgent->request(GET
https://www.accessallstate.com/anon/login.aspx);

Thanks,
Kenny


Reply via email to