该页面代码如下
<FORM name=login action=login.php method=post>
<TABLE>
<TBODY>
<TR>
<TD>Username:</TD>
<TD><INPUT style="WIDTH: 110px" name=user></TD></TR>
<TR>
<TD>Password:</TD>
<TD><INPUT style="WIDTH: 110px" type=password value="" name=pass></TD></TR></TBODY></TABLE><INPUT type=checkbox value=yes name=surf> Begin Surfing Now!<BR><FONT style="FONT-SIZE: 3px"><BR></FONT><INPUT style="WIDTH: 110px" type=submit value="Log in"> </FORM>
var ts:tstringlist;
begin
ts.Add('user=guest');
ts.Add('pass=guest');
ts.Add('surf=true');
resstr.Text:=self.IdHTTP1.Post('http://www.magnifytraffic.com/login.php',ts);
另,增加IdCookieManager1控件,设计idhttp1的Cookiemanager属性为IdCookieManager1
Handleredirect属性为true