2个回答
展开全部
给一个你参考者租吧, 用的是 IDhttp控件
function TAutoCardFrom.LogOn(Name, Pass: string): Boolean;
var
stream:TStringStream;
begin
try
stream:=TStringStream.Create('emid='+Name+'&empassword='+Pass);
IdHttp1.HandleRedirects:=True;
IdHttp1.Request.Referer:='http://88.88.8.88:81/Index.asp';
IdHttp1.Request.UserAgent:= 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)';
IdHttp1.Request.ContentType:='首腔兆application/x-www-form-urlencoded';
memo1.Lines.Text:=IdHttp1.Post('LogOn.asp'圆凳,stream); // 按钮触发
finally
stream.Free;
end;
end;
function TAutoCardFrom.LogOn(Name, Pass: string): Boolean;
var
stream:TStringStream;
begin
try
stream:=TStringStream.Create('emid='+Name+'&empassword='+Pass);
IdHttp1.HandleRedirects:=True;
IdHttp1.Request.Referer:='http://88.88.8.88:81/Index.asp';
IdHttp1.Request.UserAgent:= 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)';
IdHttp1.Request.ContentType:='首腔兆application/x-www-form-urlencoded';
memo1.Lines.Text:=IdHttp1.Post('LogOn.asp'圆凳,stream); // 按钮触发
finally
stream.Free;
end;
end;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询