例子只提供發送接口示例,其他接口調用方法雷同!
PHP JAVA Python ASP.NET ASP C/C++
PHP
發送短信請求示例

function   httpPost($sURL,$aPostVars)
{ 
  $srv_ip = '域名';//你的目標服務地址或頻道.
  $srv_port = 80;
  $url = $sURL; //接收你post的URL具體地址 
  $fp = '';
  $resp_str = '';
  $errno = 0;
  $errstr = '';
  $timeout = 300;
  $post_str = $aPostVars;//要提交的內容.
    
  $fp = fsockopen($srv_ip,$srv_port,$errno,$errstr,$timeout);
  if (!$fp)
  {
   echo('fp fail');

  }

  $content_length = strlen($post_str);
  $post_header = "POST $url HTTP/1.1\r\n";
  $post_header .= "Content-Type:application/x-www-form-urlencoded\r\n";
  $post_header .= "User-Agent: MSIE\r\n";
  $post_header .= "Host: ".$srv_ip."\r\n";;
  $post_header .= "Content-Length: ".$content_length."\r\n";
  $post_header .= "Connection: close\r\n\r\n";
  $post_header .= $post_str."\r\n\r\n";
  
  //echo $post_header;
  //echo $aPostVars; 

  fwrite($fp,$post_header);

  $inheader = 1;
  while (!feof($fp)) {
        $line = fgets($fp,1024); //去除請求包的頭只顯示頁面的返回數據
        if ($inheader && ($line == "\n" || $line == "\r\n")) {
             $inheader = 0;
        }
        if ($inheader == 0) {
          echo $line;
        }
  }
}
$content = "您的注冊驗證碼為8268,該驗證碼10分鐘內有效。如非本人操作請忽略此短信!【浪馳軟件】";
$content = iconv("utf-8","gb2312//IGNORE",$content); //如果是UTF-8 需要轉碼GB2312

httpPost("/LANZGateway/DirectSendSMSs.asp","UserID=999999&Account=lanz2016
&Password=735FF0028B7831D2783DD7EE98E3095DB94A1D64&Content=$content&Phones=11111111111&ReturnXJ=1");

	
返回值
XML:
<?xml version="1.0" encoding="GB2312"?>
<LANZ_ROOT>
<ErrorNum>0</ErrorNum>
<JobID>2321313130</JobID>
<PhonesSend>98</PhonesSend>
<ErrPhones>13855556666;13611112222</ErrPhones>
<DeductionSMSs>1000</DeductionSMSs>
</LANZ_ROOT>

JSON:
{
"LANZ_ROOT": {
"ErrorNum": "0",
"JobID": "2321313130",
"PhonesSend": "98",
"ErrPhones": "13855556666;13611112222",
"DeductionSMSs": "1000"
}
}
久久久亚洲精品视频_91精品国产91久久久无码_中文字幕亚洲人妻_手机成人中文字幕
91a国产尤物视频| 无码人妻一区二区三区免费视频| 国产精品亚洲成在人线| 无码中文字幕日韩专区视频| 亚洲精品国产三级在线| 色欲av免费一区二区三区| 亚洲AV色噜噜男人的天堂| 国产精品嫩草影院午夜| A级毛片无码久久精品免费| 亚洲无码色播在线|