<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國際加速解決方案。 廣告
                秒滴云:[http://api.miaodiyun.com/login.html](http://api.miaodiyun.com/login.html) 開發成本:20元 注冊人工費成本:100元 開發人員費用50元 運行環境:php7及以上版本運行環境 第一步:確保 php環境就緒 第二步:展開壓縮包,使用文本編輯器打開php_demo.php文件,替換以下參數 $accountSid="cdc1aabbf2d445108cc13271eexxxxxx"; //登陸官網開發者中心界面,可以查詢到自己的accountSid,將該參數替換為自己的accountSid $auth_token="5ecbeaa30b6c477cb77c2bedb5xxxxxx"; //登陸官網開發者中心界面,可以查詢到自己的auth_token,將該參數替換為自己的auth_token $to="186xxxxxxxx"; //替換為自己的手機號碼 $templateid="3284"; //登陸官網開發者中心界面,創建模版并審核通過,得到模版ID,將該參數替換為已經審核過的模版ID $param="1234"; //替換為自己想下發的動態參數 第三步:將python_demo.php文件上傳到php網站,以上傳到php網站的根目錄下為例 第四步:在瀏覽器中輸入python_demo.php的路徑進行測試,比如:http://localhost/php_demo.php ```<?php class Mdi{ function sendSMS($card_number){ header("Content-Type: text/html; charset=UTF-8"); //配置 $accountSid="cdc1aabbf2d445108cc13271eexxxxxx"; $auth_token="5ecbeaa30b6c477cb77c2bedb5xxxxxx"; $templateid="3284";//模板號 $to="186xxxxxxxx";//手機號 $param="1234";//驗證碼 //接口對接 list($msec, $sec) = explode(' ', microtime()); $timestamp = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000); //簽名加密 $sig=md5($accountSid.$auth_token.$timestamp); $data="accountSid=".$accountSid."&to=".$to."&templateid=".$templateid."&param=".$param."&timestamp=".$timestamp."&sig=".$sig; //$data='accountSid=7727bb0e0f9b910c48fc1ec5e3xxxxxx&to=186xxxxxxxx&templateid=1000&param=5,test&timestamp=1555570111645&sig=214a2905e44c221c3409b84cdaxxxxxx'; $url='https://openapi.miaodiyun.com/distributor/sendSMS'; $curl = curl_init(); // 啟動一個CURL會話 curl_setopt($curl, CURLOPT_URL, $url); // 要訪問的地址 curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 對認證證書來源的檢查 curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); // 從證書中檢查SSL加密算法是否存在 curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // 模擬用戶使用的瀏覽器 curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // 使用自動跳轉 curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // 自動設置Referer curl_setopt($curl, CURLOPT_POST, 1); // 發送一個常規的Post請求 curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // Post提交的數據包 curl_setopt($curl, CURLOPT_TIMEOUT, 30); // 設置超時限制防止死循環 curl_setopt($curl, CURLOPT_HEADER, 0); // 顯示返回的Header區域內容 curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 獲取的信息以文件流的形式返回 $res = curl_exec($curl); // 執行操作 if (curl_errno($curl)) { return ["code"=>0,"msg"=>'Errno'.curl_error($curl)];//捕抓異常 } curl_close($curl); // 關閉CURL會話 return ["code"=>1,"msg"=>$res,"data"=>$param]; } } ```
                  <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>

                              哎呀哎呀视频在线观看