var
URL:OleVariant;
POST:OleVariant;
target:OleVariant;
flag:OleVariant;
header:OleVariant;
PostStr,ipass,iname,imob,itext:String;
PostLen,Index:Integer;
begin
//用户名
iname := 'test';
ipass := 'test';
//密码
ipass := StrToMD5(ipass+iname);
imob := '15900499999';
itext := '它负责对乘客卡的合法性进行检验,并对合法的乘客卡进行扣款收费......';
URL := 'http://api.sms.cn/sms/?ac=send&uid=' + iname + '&pwd= ' + ipass + ' &mobile= ' + imob + ' &content=' + itext;
//URL:='http://api.sms.cn/sms/?ac=send&uid=test&pwd=E10ADC3949BA59ABBE56E057F20F883E&mobile=15900499999&content=你好,你的验证码是4654【云信使】' ;
PostStr:='Login.Token1=04538&Login.Token2=*******&Submit=%B5%C7+%C2%BC';
target:=NULL;
flag:=0;
PostLen := Length(PostStr);
// 用构建 varByte 类型的 Variant array
Post := VarArrayCreate([0, (PostLen - 1)], varByte);
// 填充数据
for Index := 0 to PostLen - 1 do
Post[Index] := Ord(PostStr[Index + 1]);
// 填补头部数据注意:application
Header := 'Content-Type: application/x-www-form-urlencoded';
WebBrowser1.Navigate2(URL,flag,target,POST,Header);
while WebBrowser1.Busy=True do
Application.ProcessMessages ;
if WebBrowser1.ReadyState <>READYSTATE_COMPLETE then
Memo1.Text :=WebBrowser1.OleObject.Document.all.tags('HTML').Item(0).outerHTML
else
Memo1.Text:='页面加载失败';
400-113-0919
售后热线:021-6101-4777 按 1
技术热线:021-6101-4777 按 2
投诉建议:021-6101-4777 按 3
业务邮箱:sms@sms.cn
网址:http://www.sms.cn