https://login.skype.com/account/login-form?usrename=a&password=b
想通过软件模拟登录,但用户名可以传过去,密码不行,而且站点打开时提示有证书。

解决方案 »

  1.   

    用Post方法提交username你打错字符了
      

  2.   

    我用idhttp post提交的, 是username,贴子上打错了,
    结果提交返回结果是一个?号
      

  3.   

    TIdHTTP + TIdSSLIOHandlerSocketOpenSSL
      

  4.   

    原来是用的IdSSLIOHandlerSocketvar
     logininfo:tstringlist;
     Response:TStringStream;
     FileName,hb: String;
     i:integer;
     s0,s1:widestring  ;
     xz,jl:boolean;
    begin
      xz:=false;jl:=false;
      listview1.Items[row].ImageIndex:=1;
      Response:=TStringStream.Create('');
      logininfo:=tstringlist.Create;
      logininfo.Add('username='+username);
      logininfo.Add('password='+password);
      logininfo.Add('click=login');
      IdHTTP1.HandleRedirects:=true  ;
      IdHTTP1.Request.Connection:='Keep-Alive';
      IdHTTP1.Request.UserAgent:='Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon)';
      IdHTTP1.Request.ContentType:='application/x-www-form-urlencoded';
      IdHTTP1.Request.Accept:='image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/msword, */*';
      IdHTTP1.Request.AcceptLanguage:='utf-8';
      IdHTTP1.Request.AcceptEncoding:='gzip, deflate';
      IdHTTP1.Request.CacheControl:='no-cache';
      IdHTTP1.ReadTimeout:=60000;
      IdHTTP1.HTTPOptions:=IdHTTP1.HTTPOptions+[hoKeepOrigProtocol];
      IdHTTP1.ProtocolVersion:=pv1_1;
      listview1.Items[row].SubItems[4]:='正在检测';
      memo1.Lines.add(IdHTTP1.get('https://login.skype.com/account/login-form?usrename=a&password=b'));
       memo1.Lines.add(Response.DataString);
      s0:=UTF8Decode(Response.DataString);