用idhttp.post登陆数据,得到返回结果,怎么得到的还是未登陆的信息?代码:
var param :TstringList;
    Response: TStringStream;
begin
Response := TStringStream.Create('');
param:=TstringList.create;
param.add('membername=user');
param.add('memberpass=password');idhttp1.post('http://www.2ccc.com',param,Response);
memo1.text:=Response;...
end;返回的信息还是未登陆的,请高手指教。

解决方案 »

  1.   

    这样的使用,帮不了什么。不过,好像不是使用 TstringList
      

  2.   

    post给哪个页面好像要指明的吧,例如2ccc.com的接收登录提交信息的是Login.asp
      

  3.   

    提交登录信息的表单的部分html:
    <form name="loginform" action="login.asp" method="post">;
    另外,不知到你分析过没有,表单通过浏览器提交时信息不是完全的字符串,而是经过浏览器的编码。因此,我觉得,可能通过调用浏览器控件的接口进行表单提交完成你的想法。
      

  4.   

    idhttp组件在post时,没有经过编码,你的流中的内容原样提交。
      

  5.   

    idhttp1.post('http://www.2ccc.com/login.asp',param,Response);
      

  6.   

    const
      url ='http://www.2ccc.com/login.asp';
    var
      param : TStringList;
    begin
      param := TStringList.Create;
      param.add('membername=xx');
      param.add('memberpass=xx');
      param.Add('act=1');
     
      idhttp1.HandleRedirects := true;
      idhttp1.Request.Referer := 'http://www.2ccc.com';
        memo1.text:= idhttp1.post(url,param);