<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                | 請求類型 | 請求地址 | | --- | --- | | POST | [http://send.6web.cn/api/Check/send](http://send.6web.cn/api/Check/send) | | 參數名 | 類型 | 描述 | | --- | --- | --- | | domain | String | 網站域名 | | key | String | 密鑰 | | phone | String | 發信手機號 | | content | String | 發信內容 | | Extnum | String | 發信標識(四位數 字) | | sendid | String | 發信模板 ID | ~~~ 請求成功 -> 返回碼 { "code": "1", "msg": "發送成功", } ~~~ ~~~ 請求失敗 -> 返回碼 { "code": "0", "msg": "錯誤信息", } ~~~ ~~~ 參照代碼(PHP) ~~~ ~~~ <?php $url =http:// send.6web.cn/api/Check/send'; $phone = '18888888';//手機號 $sendid = '1001';//模板ID $Extnum = mt_rand(1000, 9999);//發信標識 $content= '發送的內容'; $postdata = [ 'domain' =>$_SERVER['HTTP_HOST'], 'key' => '用戶密鑰', 'phone' =>$phone, 'content' => $content, 'Extnum' => $Extnum, 'sendid' => $sendid ]; $result = request_post($url,$postdata); $status = json_decode($result,true); if($status['code'] != '0'){ //發送失敗,參考返回的msg }else{ //發送成功 } function request_post($url = '', $post_data =0) { if (empty($url) || empty($post_data)) { return false; } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); $httpheader[] = "Accept:*/*"; $httpheader[] = "Accept-Encoding:gzip,deflate,sdch"; $httpheader[] = "Accept-Language:zh-CN,zh;q=0.8"; $httpheader[] = "Connection:close"; curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader); if ($post_data) { curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); } curl_setopt($ch, CURLOPT_ENCODING, "gzip"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $ret = curl_exec($ch); curl_close($ch); return $ret; } ~~~ ~~~ 參照代碼(JAVA) ~~~ ~~~ import java.util.HashMap; import java.util.Map; public class SmsSender { public static void main(String[] args) { String url = "http://send.6web.cn/api/Check/send"; String phone = "18888888";// 手機號 String sendid = "1001";// 模板ID int extnum = (int) (Math.random() * 9000) + 1000;// 發信標識 String content = "發送的內容"; Map<String, String> postdata = new HashMap<String, String>(); postdata.put("domain", System.getenv("HTTP_HOST")); postdata.put("key", "用戶密鑰"); postdata.put("phone", phone); postdata.put("content", content); postdata.put("Extnum", Integer.toString(extnum)); postdata.put("sendid", sendid); String result = requestPost(url, postdata); Map<String, Object> statusMap = jsonDecode(result);// 假設已經實現了該方法 String code = (String) statusMap.get("code"); if (!"0".equals(code)) { // 發送失敗,參考返回的msg String msg = (String) statusMap.get("msg"); System.out.println("發送失敗:" + msg); } else { // 發送成功 System.out.println("發送成功"); } } private static String requestPost(String url, Map<String, String> postdata) { // 實現HTTP POST請求并返回結果的代碼 // ... return ""; } private static Map<String, Object> jsonDecode(String json) { // 解析JSON并返回結果的代碼 // ... return new HashMap<>(); } } ~~~
                  <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>

                              哎呀哎呀视频在线观看