![信息](https://yp.xttwz.top/d/tygry/tb/wb/119.jpg)
![信息](https://yp.xttwz.top/d/tygry/tb/wb/120.png)
代码加到action/function.php 50行左右
//邮箱白名单
function match_email($mail){
$domain=array(1=>"@qq.com", "@163.com", "@139.com", "@vip.qq.com", "@sohu.com", "@sohu.com", "@gmail.com", "@gmail.com", "@foxmail.com", "@outlook.com");
foreach ($domain as $k=>$v){
if($k==count($domain)){
if(!preg_match("/".$domain[$k]."/", $mail)){
return 1;
}
else{return 0;}
}
if(preg_match("/".$domain[$k]."/", $mail)){return 0;}
else{continue;}
}
}
代码加到同一文件发送验证码函数中,位置如图
if(match_email($to)){return array('error' => 1, 'ys' => 'danger', 'msg' => '本站只允许使用QQ、163等邮箱登陆注册,具体请查看用户注册协议');};
本站脚本代码仅供学习交流使用请勿商业运营,严禁从事违法,侵权等任何非法活动,否则后果自负!
© 版权声明
THE END
暂无评论内容