mirror of
https://github.com/flucont/btcloud.git
synced 2025-10-14 14:20:22 +00:00
update
This commit is contained in:
@@ -387,6 +387,7 @@ class Api extends BaseController
|
||||
return json(['page'=>"<div><span class='Pcurrent'>1</span><span class='Pnumber'>1/0</span><span class='Pline'>从1-1000条</span><span class='Pcount'>共计0条数据</span></div>", 'data'=>[]]);
|
||||
}
|
||||
|
||||
//获取所有蜘蛛IP列表
|
||||
public function btwaf_getspiders(){
|
||||
try{
|
||||
$result = Plugins::btwaf_getspiders();
|
||||
@@ -396,6 +397,14 @@ class Api extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
//分类获取蜘蛛IP列表
|
||||
public function get_spider(){
|
||||
$type = input('get.spider/d');
|
||||
if(!$type) return json([]);
|
||||
$result = Plugins::get_spider($type);
|
||||
return json($result);
|
||||
}
|
||||
|
||||
//检查黑白名单
|
||||
private function checklist(){
|
||||
if(config_get('whitelist') == 1){
|
||||
|
@@ -151,4 +151,18 @@ class Plugins
|
||||
return $result;
|
||||
}
|
||||
|
||||
//分类获取蜘蛛IP列表
|
||||
public static function get_spider($type){
|
||||
$result = cache('get_spider_'.$type);
|
||||
if($result){
|
||||
return $result;
|
||||
}
|
||||
$url = 'https://www.bt.cn/api/panel/get_spider?spider='.$type;
|
||||
$data = get_curl($url);
|
||||
$result = json_decode($data, true);
|
||||
if(!$result) return [];
|
||||
cache('get_spider_'.$type, $result, 3600 * 24);
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user