用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;返回的信息还是未登陆的,请高手指教。
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;返回的信息还是未登陆的,请高手指教。
<form name="loginform" action="login.asp" method="post">;
另外,不知到你分析过没有,表单通过浏览器提交时信息不是完全的字符串,而是经过浏览器的编码。因此,我觉得,可能通过调用浏览器控件的接口进行表单提交完成你的想法。
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);