use strict; use WWW::Mechanize; use Storable; my $login = "user"; my $password = "pass"; my $session_name = "me"; my $filename = "out.txt"; my $filename2 = "out2.txt"; my $login_url = "https://esolutions.landauerinc.com/lisn/protected/default.aspx"; my $dh_url = "https://esolutions.landauerinc.com/lisn/protected/AssignedDose.aspx"; # login to your LISN account my $mech = WWW::Mechanize->new( autocheck => 1 ); $mech->get($login_url); $mech->submit_form( form_name => "_ctl0", fields => { txtUserName => $login, txtPassword => $password } ); # my $c = $mech->content; # open (FILE, ">out3.txt"); # print FILE $c; # close FILE; $mech->get($login_url ); #, ':content_file' => $filename ); # Enter Session Name $mech->submit_form( form_number => 1, fields => { txtUserName => $session } ); # Get Dose History Search Form #$mech->get( $dh_url, ':content_file' => $filename ); #print " ", -s $filename, " bytes\n"; #### use HTTP::Proxy; use HTTP::Recorder; my $proxy = HTTP::Proxy->new(); # create a new HTTP::Recorder object my $agent = new HTTP::Recorder; # set the log file (optional) $agent->file("httpout.txt"); # set HTTP::Recorder as the agent for the proxy $proxy->agent( $agent ); # start the proxy $proxy->start(); 1;