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

                1、先去短信寶注冊,購買5元起的短信http://www.smsbao.com/ 2、控制器代碼實例 ~~~ //生日祝福 public function shengrizhufu(){ $xingming = input('param.xingming');//接受表單傳過來的姓名 $shouji = input('param.shouji');//接受表單傳過來手機 $statusStr = array( "0" => "短信發送成功", "-1" => "參數不全", "-2" => "服務器空間不支持,請確認支持curl或者fsocket,聯系您的空間商解決或者更換空間!", "30" => "密碼錯誤", "40" => "賬號不存在", "41" => "余額不足", "42" => "帳戶已過期", "43" => "IP地址限制", "50" => "內容含有敏感詞" ); $smsapi = "http://api.smsbao.com/"; $user = "*******"; //短信寶平臺你的帳號 $pass = md5("*******"); //短信寶平臺你的登錄密碼 $content="[品牌名]親愛的學員".$xingming.",全體老師祝你生日快樂,一生幸福!";//要發送的短信內容 $phone = $shouji;//要發送短信的手機號碼 $sendurl = $smsapi."sms?u=".$user."&p=".$pass."&m=".$phone."&c=".urlencode($content); $result =file_get_contents($sendurl) ; //echo $statusStr[$result]; $this->success($statusStr[$result]);exit; } ~~~ 3、發送驗證碼與上面差不多 ~~~ A、用$randcode = rand(1000,9999);隨機產生一個4位隨機數 B、用$_SESSION把這個隨機數存儲起來 C、用短信把這個隨機數發給用戶 D、最后判斷用戶輸入的值與SESSION對比就好了 ~~~ html參考 ~~~ <div class="form-group border"> <label class="control-label col-xs-3">手機號碼</label> <div class="col-xs-9"> <input type="text" class="form-control" id="regphonenumber" name="args[userphone]" needle="needle" datatype="phonenumber" msg="您必須填寫手機號" placeholder="請輸入手機號"/> </div> </div> <div class="form-group border"> <label class="control-label col-xs-3">驗證碼</label> <div class="col-xs-5"> <input type="password" class="form-control" name="randcode" needle="needle" datatype="number" msg="您必須填寫驗證碼" placeholder="請輸入驗證碼"/> </div> <div class="col-xs-4 text-right"> <a id="sendregphonecode">發送驗證碼</a> </div> </div> <script> if("undefined" != typeof pep.sendevent)clearInterval(pep.sendevent); pep.sendstatus = true; $('#sendregphonecode').click(function(){ var _this = $(this); if(pep.sendstatus) { $.getJSON('index.php?core-api-index-sendsms&action=reg&phonenumber='+$('#regphonenumber').val()+'&userhash='+Math.random(),function(data){ if(parseInt(data.statusCode) == 200) { _this.html('120秒重發'); pep.sendstatus = false; sendtime = 120; sendevent = setInterval(function(){ if(sendtime > 0) { sendtime--; _this.html(sendtime+'秒重發'); } else { pep.sendstatus = true; _this.html('發送驗證碼'); clearInterval(sendevent); } },1000); } else { pep.mask.show('ajax',data); } }); } }); </script> ~~~
                  <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>

                              哎呀哎呀视频在线观看