source/model/sms.model.php
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class smsModel extends model{
public function __construct(&$base=null){
parent::__construct ();
}
public function setSms($data){
$this->smsServer=$data;
return $this;
}
public function unSetSms(){
$this->smsServer=NULL;
return $this;
}
function sendSMS($mobile,$content,$time=0,$mid=0){
$con=is_array($content)?$content['content']:$content;
skyLog("smslog.txt",$mobile.$con);
//判断是否黑名单
$row=M("badphone")->selectRow("telephone='".$mobile."'");
if($row){
return false;
}
//检测短信异常
$ip=ip();
$key="smsCheck".md5($ip);
$num=cache()->get($key);
if($num>3){
return false;
}
$num=$num+1;
cache()->set($key,$num,300);
$logid=M("sms_log")->insert(array(
"telephone"=>$mobile,
"content"=>$con,
"dateline"=>time()
));
if(function_exists("sendsms")){
return sendSMS($mobile,$content,$logid);
}
if(is_array($content)){
$content=$content['content'];
}
if(empty($this->smsServer)){
$data=array(
"uid"=>PHONE_USER,
"sign"=>PHONE_PWD
);
}else{
$data=$this->smsServer;
}
$statusStr = array(
"0" => "短信发送成功",
"-1" => "参数不全",
"-2" => "服务器空间不支持,请确认支持curl或者fsocket,联系您的空间商解决或者更换空间!",
"30" => "密码错误",
后面还有 61 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。