I'm trying to log into a site and then pass the same cookies and headers that are used 
for the first site into another site.  Should I just be able to do a get to the second 
site and still maintain the same cookies and headers?

Here's the meat of my code:

foreach $target(@targets) {
        if ($verbose!=0) {print "INFO:  Logging into $target\n"};
        $browser = LWP::UserAgent->new;
        $response = $browser->post(
                'https://www.firstsite.com/',
                [
                        "USER" => $username,
                        "PASSWORD" => $password,
                ]
        );

        if ($verbose!=0) {print "RESPONSE\n";}
        if ($verbose!=0) {print $response->as_string;print "\n";}

        if ($verbose!=0) {print "INFO:  Logging into second site\n";}
        $response = $browser->get('https://www.secondsite.com');
        if ($verbose!=0) {print "RESPONSE\n";}
        if ($verbose!=0) {print $response->as_string;print "\n";}
}

Thanks in advance.

--------------------------
Alan Olegario
http://www.fxall.com
[EMAIL PROTECTED]
(P) 646-268-9988
(F) 646-268-9996
(C) 732-501-5212


DISCLAIMER:
This message is intended for the named addressee(s) only and contains information that 
may be confidential, non-public or legally privileged.  If you are not the intended 
recipient, you must not copy this message or attachment or disclose the contents to 
any other person.  If you received this email in error, please contact the sender and 
permanently delete the email and any attachments. Unless expressly stated, opinions in 
this email are those of the individual sender and not of FX Alliance, LLC or its 
affiliates.

Reply via email to