• delphi webbrowser post自动登录


    delphi webbrowser post自动登录  

     

     
     
    var
      EncodedDataString: WideString;
      PostData: OleVariant;
      Headers: OleVariant;
      I: Integer;
    begin

      // 创建提交串
      EncodedDataString := 'waybills='+HTTPEncode(edtshippingsn.Text)+'&'+'verifycode=' + HTTPEncode(edtcode.Text);

      // 创建字节方式的可变变量数组,并将字符串转换之。
      PostData := VarArrayCreate([0, Length(EncodedDataString) - 1], varByte);
      // Now, move the Ordinal value of the character into the PostData array
      for I := 1 to Length(EncodedDataString) do
          PostData[I-1] := Ord(EncodedDataString[I]);

      // 头类型
      Headers := 'Content-Type: application/x-www-form-urlencoded' + #10#13;

      // 提交
      wb1.Navigate('http://www.exp.com/myquery/queryBill.action?locale=zh_CN', EmptyParam,
          EmptyParam, PostData, Headers);

    end;
  • 相关阅读:
    Nim or not Nim? hdu3032 SG值打表找规律
    Maximum 贪心
    The Super Powers
    LCM Cardinality 暴力
    Longge's problem poj2480 欧拉函数,gcd
    GCD hdu2588
    Perfect Pth Powers poj1730
    6656 Watching the Kangaroo
    yield 小用
    wpf DropDownButton 源码
  • 原文地址:https://www.cnblogs.com/honeynm/p/4070593.html
Copyright © 2020-2023  润新知