极狐服务器列表

This commit is contained in:
“wanyongkang”
2024-06-21 17:20:57 +08:00
parent c05fd8568b
commit 5fa8327363
4 changed files with 76 additions and 1 deletions

View File

@@ -73,6 +73,15 @@ if ($mogu) {
fclose($mogu_f);
}
//极狐
$url = "http://124.236.113.166:18702/api/agent/getList2?apikey=80cf4f64e990b78a9fc5eb";
$jihu = json_decode(file_get_contents($url), true)['data'];
if ($jihu) {
$jihu_f = fopen(__DIR__ . '/data/jihu.csv', 'w');
jihu_getList($jihu, $jihu_f, $all);
fclose($jihu_f);
}
//麒麟动态
$dnx_has_exit = [];
@@ -836,6 +845,57 @@ function mogu_getList($data, &$file, &$all )
}
//极狐服务器解析规则
function jihu_getList($data, &$file, &$all )
{
$key = '';
$list1 = [];
// print_r($data);
$province_record = [];
foreach ($data as $info) {
$record = [];
$record['name'] = '极狐';
//如果存在 不为空 则
$city_name = explode('-',$info['city']);
if(empty($info['city'])) {
continue;
}
//如果存在 不为空 则
if (!in_array( $city_name[0], $province_record)) {
$record['city'] = $city_name[0];
$province_record[] = $city_name[0];
$key = $record['city'];
$list1[$key][] = $record;
}
$key = $city_name[0];
$record['city'] = $city_name[1];
$record['supply'] = $info['yunying'];
$record['ip'] = $info['ipCount'];
$record['daikuan'] = $info['daikuan'];
$record['onlineuser'] = '';
$record['maxuser'] = '';
$record['online'] = $info['status'];
$record['status'] = $info['onlinestatus'];
$record['nasname'] = $info['address'];
$list1[$key][] = $record;
}
foreach ($list1 as $val) {
foreach ($val as $net_data) {
fputcsv($file, $net_data);
fputcsv($all, $net_data);
}
}
}
//麒麟服务器解析规则
function qilin_getList($data, &$file, &$all, $exit )
{