微赞微信管理系统短信接口修改,56短信接口目前适用于市场上所有的商城、CMS、手机APP、网站等,无论您的程序是那个版本,您在修改中或调到短信接口中遇到问题可以随时联系我们技术人员,微信QQ同号:QQ:826585910,我们将为您提供免费的技术支持,如果您对代码不懂,可以联系我们技术人员帮您免费接入调试。
微信微信到以前几个文件
data\tpl\web\default\system\common.tpl.php
framework\function\sms.func.php
web/source/system/common.ctrl.php
web/source/utility/verifycode.ctrl.php
web/source/user/register.ctrl.php
其实发送短信的文件:sms.func.php 核心代码如下:
function sms_send(mobile = '',content = '',signature = '',check = true) {
global_W;
setting = setting_load('sms');
if(empty(setting['sms'])){
return error(1, "未设置短信接口,无法发送短信!");
}
config =setting['sms'];
row = pdo_fetch("SELECT `notify` FROM " . tablename('uni_settings') . " WHERE uniacid = :uniacid", array(':uniacid' =>_W['uniacid']));
row['notify'] = @iunserializer(row['notify']);
smsconfig=array("balance"=>999,"signature"=>_W['setting']['sitename']);
if (!empty(row['notify']) && !empty(row['notify']['sms'])) {
smsconfig =row['notify']['sms'];
}
//if(check){
// if (intval(smsconfig['balance'])<=0){
// return error(1, "短信条数不足,请联系客服人员".row['notify']['sms']['balance']);
// }
//}
if(empty(signature)){
signature = "";
}
username =config['ihuyi_username'];
pwd =config['ihuyi_pwd'];
target = "http://jiekou.56dxw.com/sms/webinterface.aspx";
post_data = "username=" .username . "&userpwd=" .pwd . "&handtel=" .mobile . "&sendcontent=" . rawurlencode(content);
result = file_get_contents(target.post_data);
xml = simplexml_load_string(result['code'], 'SimpleXMLElement', LIBXML_NOCDATA);
msg = (string)xml->msg;
if(result=='0'){
row['notify']['sms']['balance'] = intval(row['notify']['sms']['balance']) -1;
pdo_update('uni_settings',array('notify'=> iserializer(row['notify'])), array('uniacid' =>_W['uniacid']));
return true;
}
return error(1,message);
}