John:
Thank you very much for your advice.  Here is the result
1)I tried setting the Referer [sic] header to the URL I followed the Refresh from as 
follows
%hash =    (  'Accept-Language' => 'en-us',
                    referer   => $RefAddress,
                    Accept   => "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, 
application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, 
application/x-shockwave-flash, */*",
    Pragma   => 'no-cache',
    'User-Agent' => 'Mozilla/3.01Gold (Macintosh; I; 68K)',
   );
$res=&ua->request($req)
I still got the login page content.
2) I tried the HTTP::Cookies as follows
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->cookie_jar();
I still got the login page content
3) I tried using LWP::RobotUA instead of using LWP::UserAgent, but I still got the 
login page content
If I fetch the homepage by using URL I followed the Refresh from right after I got the 
refresh response, the homepage content is not exactly the login page, and it says 
"Your session has timed out"
Thank yo again for your help
Jack

John J Lee <[EMAIL PROTECTED]> wrote:
On Tue, 27 May 2003, Jack Yang wrote:
[...]
> But this time, I got a response html which basically asked me to login
> the securesite. Can anyone give me some advice why this happens?
[...]

Try setting the Referer [sic] header to the URL you followed the Refresh
from. Try giving the UserAgent a cookie jar (perldoc HTTP::Cookies).
HIDDEN HTML form controls (and any other controls, of course) may also
need to be sent back (perldoc HTML::Form) to preserve session IDs and
other state.


John


---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).

Reply via email to