composer @Ta | |
2019-09-20 11:54 |
$ua = $_SERVER[‘HTTP_USER_AGENT’];
$now_ua = array(‘FeedDemon ‘,’ZmEu’,’Indy Library’,’oBot’,’jaunty’); //将恶意USER_AGENT存入数组
if(!$ua) { //禁止空USER_AGENT,dedecms等主流采集程序都是空USER_AGENT,部分sql注入工具也是空USER_AGENT
header(“Content-type: text/html; charset=utf-8”);
wp_die(‘请勿采集本站,因为采集的站长木JJ!’);
}else{
foreach($now_ua as $value )
if(eregi($value,$ua)) {
header(“Content-type: text/html; charset=utf-8”);
wp_die(‘请勿采集本站,因为采集的站长木JJ!’);
}
}
阅:1732 | 发表于2019-09-20 11:54 |
心灵鸡汤:
      
®2019-2024 all power by Zlproject3.7
川公网安备 51192202000151号
蜀ICP备2021014921号-2
首页 #top
天合之作 曲在人意