想用xmlhttp写个自动登录
网上的例子太少了
小白求指教,感谢。
function HTTPPOST1(const url: ansistring): ansistring;
var
  r: OleVariant;
  s: ansistring;
  ceshi:string;
var
  xmlHttp: OleVariant;
begin
  url:='https://auth.eve-online.com.cn/oauth/authorize?client_id=eveclient&scope=eveClientLogin&response_type=token&redirect_uri=https%3A%2F%2Fauth.eve-online.com.cn%2Flauncher%3Fclient_id%3Deveclient';
  ceshi:='Username=123456&Password=123456'';
  xmlHttp := CreateOleObject('MSXML2.XMLHTTP');
  try
    xmlHttp.open('POST',url,false);
    xmlHttp.setRequestHeader('Content-Length', IntToStr(Length(ceshi)));
    xmlHttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');
    xmlHttp.send(ceshi);
    Result:=xmlHttp.ResponseText;
  finally
    xmlHttp:=Unassigned;
  end;
end;