use HTTP::Request; use HTTP::Cookies; my $_cookie_file = "/home/first/cook/.lwp_cookies.dat"; $_post_url = 'http://www.eb2b.net/E2B_UMLogOn.process'; # Create new LWP::UserAgent object $browser = LWP::UserAgent->new; # Add a new Cookie Jar to the LWP Object $browser->cookie_jar(HTTP::Cookies->new("file" => $_cookie_file)); # Spoof a very capable browser $browser->agent('Mozilla/5.0'); # Allow https protocol and http.... $browser->protocols_allowed( [ 'http', 'https'] ); # Add the HTTP::Request for POST... $req = HTTP::Request->new("POST" => "$_post_url"); # Add "content type" as form encoded $req->content_type("application/x-www-form-urlencoded"); # Add the "Form fields" that are contained in the page... $req->content("IWPEProcessFlow.submitted.sequenceID=&logonUsername=myhiddenusername&logonPassword=myhiddenpass&Logon=Login&hMsgUserNotFound=User with this name was not found.&hMsgInvalidPassword=Logon not valid.&fromHomePage=default_B2B.htm"); # Spoof the referrer to make the site think it's a person # from the login page... $req->referrer("http://www.eb2b.net/Templates/UM/RegisterCustomer/E2B_UMLogon.tem"); # Ok, now Perform Task $response = $browser->request($req); if($response->is_success) { # This is not working as it is posting in the 'ELSE' statement. It is actually posting this in the "$response->content" field: START $response->content Refresh User Repository END $response->content