hi,
hello use this code. It will work
use strict; use LWP::UserAgent; use URI::URL; use HTTP::Cookies; my $ua = LWP::UserAgent->new; $ua->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1 +6) Gecko/20080702 Firefox/2.0.0.16 (.NET CLR 3.5.30729)"); my $cookie_jar = HTTP::Cookies->new(file=>$0."_cookie.txt",autosave => + 1,); $ua->cookie_jar($cookie_jar); my $req=HTTP::Request->new(POST=>"https://www.dccourts.gov/cco/maincas +e.jsf"); $req->header("Content-Type"=> "application/x-www-form-urlencoded"); $req->header("Cookie"=>"JSESSIONID=9kpdNJ7dLQRc62Bsj3mTGsPNRnsvKyvL2DD +JtLPgLhXpD9nwGSWm!-462614910"); $req->content("appData%3Asearchform=appData%3Asearchform&appData%3Asea +rchform%3AsearchPanelCollapsedState=false&appData%3Asearchform%3Ajsps +earchpage%3AlastName=&appData%3Asearchform%3Ajspsearchpage%3AcompanyN +ame=&appData%3Asearchform%3Ajspsearchpage%3AfirstName=&appData%3Asear +chform%3Ajspsearchpage%3Aj_id_id14pc4=2011&appData%3Asearchform%3Ajsp +searchpage%3AselectCaseType=CF2&appData%3Asearchform%3Ajspsearchpage% +3Aj_id_id18pc4=003817&appData%3Asearchform%3Ajspsearchpage%3AnameAttr +ibutesPanelCollapsedState=true&appData%3Asearchform%3Ajspsearchpage%3 +AsubmitSearch.x=43&appData%3Asearchform%3Ajspsearchpage%3AsubmitSearc +h.y=12&javax.faces.ViewState=j_id1%3Aj_id3"); my $res=$ua->request($req); $cookie_jar->extract_cookies($res); $cookie_jar->save(); $cookie_jar->add_cookie_header($req); my $code=$res->code(); print "code:$code\n"; my $cont=$res->content(); open(postcontent,">>postcontent.html"); print postcontent $cont;
Regards, Senthil
In reply to Re: LWP SSL TImeouts
by senthilkumarperl
in thread LWP SSL TImeouts
by amsclark
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |