1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| use LWP::UserAgent;
my $browser = LWP::UserAgent->new; $browser->timeout(600); my $TARGET_URL = "http://122.114.25.231:8582/emp/selfOpenAccountAction!khQuery.action?step=xhdq"; my %headers=( 'Accept'=>'text/html, application/xhtml+xml, */*', 'Accept-Encoding'=>'gzip, deflate', 'Accept-Language' => 'zh-CN', 'Cache-Control' => 'no-cache', 'Connection' => 'Keep-Alive', 'Content-Length' => '71', 'Content-Type' => 'application/x-www-form-urlencoded', 'Cookie' => 'JSESSIONID=4D4E92EB8830CA8B5DC7F9AA1751AC71', 'Host' => '122.114.25.231:8582', 'Referer' => 'http://122.114.25.231:8582/emp/query.jsp', 'User-Agent' => 'Mozilla/5.0 (MSIE 9.0; Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko'); my $response = $browser->post($TARGET_URL, [ 'dealer.certificateNum' => $id, 'dealer.name' => $name, ] ,%headers ); if ($response->is_success) { my $htmlcontentStr = $response->content; }
|