Leser: 20
1 2 3 4 5
<td class="wp1-cdl-form"> <input type="image" name="ctl00$ctl00$ctl22$ctl00$ctl02$IBtn_Refresh1" id="ctl00_ctl00_ctl22_ctl00_ctl02_IBtn_Refresh1" title="Aktualisieren" src="http://www.handelsblatt.com/images/buttons/bt_aendern.gif" alt="Aktualisieren" style="border-width:0px;" /> </td>
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 28 29 30 31 32
use LWP; my $browser = LWP::UserAgent->new(); my $url = q~http://www.handelsblatt.com/default.aspx?_p=73&wp1_symbol=MAN.FSE&wp1_t=wp1_quoteshistory~; my $seite = $browser->post( $url, { 'ctl00$ctl00$ctl22$ctl00$ctl02$DD_Day' => '1', 'ctl00$ctl00$ctl22$ctl00$ctl02$DD_Month' => '1', # Monat: Januar 'ctl00$ctl00$ctl22$ctl00$ctl02$DD_Year' => '1998', 'ctl00$ctl00$ctl22$ctl00$ctl02$Txt_Time' => '23:59', 'ctl00$ctl00$ctl22$ctl00$ctl02$DD_Lines' => '100', 'ctl00$ctl00$ctl22$ctl00$ctl02$DD_Step' => '2', # Darstellung: Tage '__VIEWSTATE' => $view, } ); $seite = $seite->decoded_content; $out = "MAN1.html"; open(OUT ,">$out") ||die ("Kann $out nicht oeffnen!!"); printf OUT ("$seite"); close (OUT);
1
2
3
4
5
6
7
8
9
10
11
12
13
POST /cgi-bin/study.pl HTTP/1.1
Host: local.local
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.11) Gecko/2009061418 Gentoo Firefox/3.0.11
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://tronde.local/cgi-bin/study.pl
Content-Type: application/x-www-form-urlencoded
Content-Length: 41
username=jippie&password=sfsd&view=verify