<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                > 注意,此處文檔是在我們平臺 www.api51.cn 充值使用的接口,而非阿里云市場接口 # POST/GET請求 地址:http://www.api51.cn/api/smsApi/sendmsg 如需https請修改為 https://www.api51.cn # 參數說明 | 參數 | 說明 | 備注 | | --- | --- | --- | | token | 用戶令牌 | 在www.api51.cn注冊后可獲得 | | mobile | 手機號 | 如:180XXXXXXXX | | msg | 短信內容 | 確保已經申請通過,已申請成功的簽名+模板內容。必須和模板分毫不差,標點符號多一個少一個都不行。 | | type | 短信類型,可選參數,默認0(普通短信) | 0:普通短信;1:營銷短信 | | country_code | 國家代碼,可選參數,默認中國(86) | 如:86 參考國家代碼表:http://help.api51.cn/432250 | # 返回示例: 發送成功 ~~~ { "result": 0, "errmsg": "OK", "ext": "", "sid": "8:5Komg28XqC78HBEDnOy20171019", "fee": 1 } ~~~ 發送失敗 ~~~ { "result": 1016, "errmsg": "手機號格式錯誤", "ext": "" } ~~~ # php代碼示例 ~~~ <?php /* 優化阿里云默認提供代碼示例 php 5.3以上版本 支持 curl */ $host = "http://www.api51.cn";//如需https請修改為 https://www.api51.cn $path = "/api/smsApi/sendmsg";//path為 single_sms_get 時為GET請求 $method = "0";//post=1 get=0 本接口都支持 $url = $host . $path; $data = array( 'token'=>'寫你的token', 'mobile'=>'1892584891',//接收手機號 'msg'=>'【API無憂】您的驗證碼為1234',//短信簽名+內容,必須與申請的分毫不差,大小寫嚴格區分 'sign'=>'API無憂',//登陸www.api51.cn申請成功的簽名 'type'=>'0',//0:普通短信,可選參數 可不傳 ); $data = http_build_query($data); $result = api51_curl($url,$data,$method); echo $result; function api51_curl($url,$data=false,$ispost=0){ $headers = array(); array_push($headers, "Content-Type".":"."application/x-www-form-urlencoded; charset=UTF-8"); $httpInfo = array(); $ch = curl_init(); curl_setopt( $ch, CURLOPT_HTTP_VERSION , CURL_HTTP_VERSION_1_1 ); curl_setopt( $ch, CURLOPT_USERAGENT , 'api51.cn' ); curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT , 300 ); curl_setopt( $ch, CURLOPT_TIMEOUT , 300); curl_setopt( $ch, CURLOPT_RETURNTRANSFER , true ); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_FAILONERROR, false); if (1 == strpos("$".$url, "https://")) { curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); } if($ispost) { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); curl_setopt( $ch , CURLOPT_POST , true ); curl_setopt( $ch , CURLOPT_POSTFIELDS , $data ); curl_setopt( $ch , CURLOPT_URL , $url ); } else { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); if($data){ curl_setopt( $ch , CURLOPT_URL , $url.'?'.$data ); }else{ curl_setopt( $ch , CURLOPT_URL , $url); } } $response = curl_exec( $ch ); if ($response === FALSE) { // echo "cURL Error: " . curl_error($ch); return false; } $httpCode = curl_getinfo( $ch , CURLINFO_HTTP_CODE ); $httpInfo = array_merge( $httpInfo , curl_getinfo( $ch ) ); curl_close( $ch ); return $response; } ?> ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看