亚洲精品国产中文字幕在线,国偷自产一区二区三区蜜臀,精品久久久国产一区二区色婷婷,成人片免费视频在线观看

點擊這里給我發(fā)消息
幫助中心

工作時間:8:30 - 17:30

DELPHI

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, IdHTTP, IdURI, Httpapp, IdBaseComponent, IdComponent,
  IdTCPConnection, IdTCPClient;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    function httpPost(postUrl:String;Params:TStrings):string;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  url : string;
  username : string;
  password,apikey,mobile,content,encode,str : string;
  Params:   TStrings;
  i :Integer;
begin
  //實例:http://sms.106jiekou.com/utf8/sms.aspx?account=用戶賬號&password=接口密碼&mobile=號碼&content=您的訂單編碼:888888。如需幫助請聯(lián)系客服。
  Params   :=   TStringList.Create;
  username := ''; //用戶名 
  password := ''; //接口密碼
  mobile :=''; //手機號,只發(fā)一個號碼:158xxxxxxxx。
  content := UTF8Encode('您的訂單編碼:7231。如需幫助請聯(lián)系客服。'); //要發(fā)送的短信內(nèi)容,特別注意:簽名必須設(shè)置,網(wǎng)頁驗證碼應(yīng)用需要加添加【圖形識別碼】以防被短信攻擊
  //ShowMessage(content);
  Params.Add('account='+username) ;
  Params.Add('password='+password) ;
  Params.Add('mobile='+mobile) ;
  Params.Add('content='+content) ;
  url := 'http://sms.106jiekou.com/utf8/sms.aspx?';
  ShowMessage(httpPost(url,Params));  //要發(fā)送的URL鏈接與內(nèi)容。
  Params.Free;
end;
function  TForm1.httpPost(postUrl:string;Params:TStrings):string;
var
  idhtp1: TIdHTTP;
begin
  idhtp1:=   TidHTTp.create(self);
  idhtp1.AllowCookies:=True;
  idhtp1.HTTPOptions:=[hoForceEncodeParams];
  idhtp1.ProtocolVersion:=pv1_1;
  idhtp1.Request.ContentType:='application/x-www-form-urlencoded';
  idhtp1.Request.CacheControl:='no-cache';
  idhtp1.Request.UserAgent:='User-Agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1';
  idhtp1.Request.Accept:='Accept=textml,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
  idhtp1.Request.AcceptEncoding:='Accept-Encoding=gzip,deflate';
  idhtp1.Request.AcceptCharSet:='Accept-Charset=gb2312,utf-8;q=0.7,*;q=0.7';
  idhtp1.Request.Connection:='Connection=keep-alive';
  try
    result := idhtp1.Post(postUrl,Params);
  except
    Result := 'error';
end;
end;

end.