發(fā)貨100是基于php+mysql為核心開發(fā)的免費(fèi)+開源的虛擬商品自動發(fā)貨系統(tǒng),小編對這款系統(tǒng)還比較了解,今天就以替換短信接口為例為大家講解一下如何進(jìn)行二次開發(fā),使用的短信接口是我們短信寶短信群發(fā)平頭的短信接口,我們短信寶短信群發(fā)平臺非常穩(wěn)定,發(fā)送速度快,注冊就送測試短信,推薦大家使用。
1:打開項(xiàng)目:\admin\config.php 大概668行,修改獲取余額函數(shù)
1
2
3
4
5
6
7
8
9
10
11
|
if ($C_codeid== "" || $C_codekey== "" ){ $sms_rest= "<font color='#ff0000'>未知</font>" ; } else { $info = explode( ',' ,$info); if (isset($info[1]) && $info[1]>0){ $sms_rest=$info[1]; } else { $sms_rest= "<font color='#ff0000'>未知</font>" ; } } |
2:在當(dāng)前項(xiàng)目大概1811行 修改短信頁面
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<p style= "text-align: center;font-weight: bold;font-size: 17px" >短信接口</p> <div class= "form-group row" > <label class= "col-md-3 col-form-label" >短信簽名</label> <div class= "col-md-9" > <input type= "text" name= "C_smssign" class= "form-control" value= "<?php echo $C_smssign?>" > </div> </div> <!--<div class= "form-group row" >--> <!-- <label class= "col-md-3 col-form-label" >企業(yè)ID</label>--> <!-- <div class= "col-md-9" >--> <!-- <input type= "text" name= "C_userid" class= "form-control" value= "--><?php //echo $C_userid?><!--" >--> <!-- </div>--> <!--</div>--> <div class= "form-group row" > <label class= "col-md-3 col-form-label" >短信寶賬號</label> <div class= "col-md-9" > <input type= "text" name= "C_codeid" class= "form-control" value= "<?php echo $C_codeid?>" > </div> </div> <div class= "form-group row" > <label class= "col-md-3 col-form-label" >短信寶密碼</label> <div class= "col-md-9" > <input type= "text" name= "C_codekey" class= "form-control" value= "" <?php if ($C_codekey!= "" ){echo "placeholder=\"已加密保存,留空則不修改\"" ;}?>> </div> </div> |
3:打開項(xiàng)目:\conn\function.php 大概3358行 修改sendsms函數(shù)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
function sendsms($content,$recieve){ global $C_userid,$C_codeid,$C_codekey; if (time()-intval($_SESSION[ "time" ])>60){ $info=getbody( " if ($info == '0' ){ $_SESSION[ "time" ]=time(); return "success" ; } return "error" ; } else { return "發(fā)送短信過于頻繁,請" .(60-time()+intval($_SESSION[ "time" ])). "秒后再試!" ; } } |
經(jīng)過上面的替換,短信寶的短信平臺已經(jīng)替換成功了,可以正常使用了。進(jìn)行測試發(fā)送:
報(bào)備一下短信寶的VIP模板,這樣就可以走短信寶的優(yōu)質(zhì)通道了,即便遇到敏感文字我們都不會人工審核,短信內(nèi)容3~5秒就可送達(dá)。
另外:我們已經(jīng)開發(fā)好完整的發(fā)貨100v1.1短信寶插件,點(diǎn)擊此鏈接?下載及查看安裝流
最新更新
電商類
CMS類
微信類