56短信网
56短信接口-易接入,最全的短信接口
微赞微信管理系统短信接口修改
来源:56短信网 发布人:技术部 发表于:2019-06-24 08:59:48 阅读:
导读: 您在修改中或调到短信接口中遇到问题可以随时联系我们技术人员,微信QQ同号:QQ:826585910,我们将为您提供免费的技术支持,如果您对代码不懂,可以联系我们技术人员帮您免费接入调试。

微赞微信管理系统短信接口修改,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);
     
}
 

为您打造简单,易接入的短信接口服务 短信接口文档 扫扫加技术微信
关于56短信网
  • 联系我们:
  • 电话:0311-85235895
  • 0311-89801332
  • Emaill:
  • jiekou@56dxw.com
  • (#替换成@)
栏目导航
短信接口文档
56短信插件
扫一扫 加微信
享24小时服务
版权所有:56短信网 网络经营许可证编号:冀ICP备08006792号