CmsEasy短信接口修改,56短信接口目前适用于市场上所有的商城、CMS、手机APP、网站等,无论您的程序是那个版本,您在修改中或调到短信接口中遇到问题可以随时联系我们技术人员,微信QQ同号:QQ:826585910,我们将为您提供免费的技术支持,如果您对代码不懂,可以联系我们技术人员帮您免费接入调试。
1.点击网站设置-输出您的56短信网的用户名和密码,记得也加上签名
2.打开cmseasy_ihuyi\lib\admin\sms_admin.php 核心代码如下:
<?php
if (!defined('ROOT')) exit('Can\'t Access !');
class sms_admin extends admin {
function manage_action() {
if(!config::get('sms_username') || !config::get('sms_password')){
echo '<script>alert("您需要先设置用户名和密码才能使用短信管理功能!");window.location.href="'.url('config/system/set/sms').'";</script>';
exit;
}
include_once("phprpc/phprpc_client.php");
$client = new PHPRPC_Client();
$client->setProxy(NULL);
$client->useService('http://jiekou.56dxw.com/sms/webinterface.aspx');
$client->setKeyLength(128);
$client->setEncryptMode(3);
if (front::post('submit')) {
if (front::post('act') == 'test') {
$rs = sendMsg(front::post('mobile'),'您的验证码是:1234。请不要把验证码泄露给其他人。');
front::flash($rs);
if($rs == '1'){
front::flash('发送成功');
}else{
front::flash('发送失败,请检查用户名、密码或剩余条数'.$rs);
}
}
}
}
function end() {
$this->render('index.php');
}
}