佳緣人才網是面向廣大政府、企業(yè)、職介行業(yè)提供全面的人才網站建設、管理、運營一體化解決方案,采用PHP5 + MYSQL5運行環(huán)境,軟件百分百開源易于二次開發(fā),可靈活擴展; 其安裝簡單方便,只需將程序上傳至服務器后加以配置即可使用。小編對他還是比較了解的,今天小編就以新增短信接口為例,給大家講解一下如何進行二次開發(fā),我們今天講解的是V3.6.0版本,使用的短信接口是我們短信寶短信群發(fā)平臺的短信接口,我們短信寶短信群發(fā)平臺的接口非常穩(wěn)定,發(fā)送速度快,注冊就送測試短信,推薦大家使用。
打開項目:\admin\templates\plus\sms.htm 在33行左右新增短信寶頁面
1
2
3
4
5
6
7
8
9
10
11
12
|
<form action= "?m=plus_sms&a=smsconfig" method= "post" > <td class = "pl20" ><b>接口配置:</b>接口服務器:<input name= "apiserver" type= "radio" class = "checkbox" value= "www" checked />國內 <input name= "apiserver" type= "radio" class = "checkbox" value= "api-hk" <{ if strpos ( $smarty .session.vcpserver, 'api-hk' )>0}> checked<{/ if }> />香港 帳號: <input type= "text" id= "username" name= "username" size= "12" class = "txt" value= "<{$smarty.session.vcpuser}>" > 密碼: <input type= "password" id = "apikey" name= "apikey" size= "12" class = "txt" value= "888888" > 簽名: <input type= "text" id = "sing" name= "sing" size= "12" class = "txt" value= "<{$smarty.session.sing}>" > 余額:<font color= "#FF0000" ><b><{ $account }></b></font>條 <input type= "submit" value= "修改配置" class = "btn" > [<a href= "http://www.gjrencai.com/reg" target= "_blank" style= "color:#F00" >申請賬號</a>] 該功能需要先申請賬號并充值后才能使用。</td> </form> |
打開項目:\admin\inc\plus_sms.inc.php 在8行左右修改下代碼
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
function sendSMS( $t_pho , $t_msg , $t_time ){ global $cfg ; $serverURL = $_SESSION [ "vcpserver" ]; $VCPU = $_SESSION [ "vcpuser" ]; $VCPApkey = md5( $_SESSION [ "vcpapikey" ]); $sing = $_SESSION [ "sing" ]; $content = '【' . $sing . '】' . $t_msg ; if ( $cfg [ 'charset' ]!= 'utf-8' ) $content =@iconv( 'gbk' , 'utf-8' , $content ); $strurl = $serverURL . "sms?u=" . $VCPU . "&p=" . $VCPApkey . "&m=" . $t_pho . "&c=" .urlencode( $content ); $result = file_get_contents ( $strurl ); if ( $result == 0){ return '000' ; } } function infoSMSAccount(){ $serverURL = $_SESSION [ "vcpserver" ]; $VCPU = $_SESSION [ "vcpuser" ]; $VCPApkey = md5( $_SESSION [ "vcpapikey" ]); $strurl = $serverURL . "balance?u=" . $VCPU . "&p=" . $VCPApkey ; $result = explode ( ',' , file_get_contents ( $strurl )); return $result [1]; } |
打開項目:\smsapi\config.php
1
2
3
4
5
6
|
<?php $_SESSION [ "vcpuser" ]= "" ; $_SESSION [ "vcpapikey" ]= "" ; $_SESSION [ "sing" ]= "" ; ?> |
經過上面的替換,短信寶的短信平臺已經替換成功了,可以正常使用了。
報備一下短信寶的VIP模板,這樣就可以走短信寶的優(yōu)質通道了,即便遇到敏感文字我們都不會人工審核,短信內容3~5秒就可送達。
另外:我們已經開發(fā)好完整的佳緣人才網v3.6.0系統(tǒng)短信寶插件,點擊此鏈接 下載及查看安裝流程。
最新更新
電商類
CMS類
微信類