您在这里:文档首页 - 源码示例

DELPHI

  
  
function TForm1.HTTPPOST1(const aurl: ansistring): ansistring;  
var  
  r: OleVariant;  
  s: ansistring;  
  ceshi,url:OleVariant;//string;  
  xmlHttp: OleVariant;  
begin  
  url:= 'http://localhost/msg/HttpBatchSendSM';  
   
   
  ceshi:='account=mytest&pswd=mytest&mobile=15988888888;&msg=【麦讯通】验证码是:123456&needstatus=false';  
   
  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');  
   
    Edit1.Text:=ceshi ;  
   
    xmlHttp.send(ceshi);  
   
    Result:=xmlHttp.ResponseText;  
  finally  
    xmlHttp:=Unassigned;  
  end;  
end; 
  
    
联系我们
即刻申请免费测试账号
联系我们
COPYRIGHT @ 2017-2020 深圳市麦讯通科技有限公司 ALL RIGHTS RESERVED.
粤公网安备 44030702001630号
技术支持:百川网络