西瓜服务器地址

This commit is contained in:
“wanyongkang”
2021-01-21 16:49:23 +08:00
parent 3c5ea813ed
commit 258ab15bc7
4 changed files with 23 additions and 3 deletions

View File

@@ -40,6 +40,13 @@ $jike = json_decode(file_get_contents("http://api.webok.me/beikeiplist/"), true)
jike_getList($jike, $jike_f, $all, $jike_data);
fclose($jike_f);
$xigua_data = get_product(__DIR__ . '/data/xigua.csv');
$xigua_f = fopen(__DIR__ . '/data/xigua.csv', 'w');
$xigua = json_decode(file_get_contents("http://api.webok.me/serverlistyzip/"), true)['data'];
//写入西瓜文件
jike_getList($xigua, $xigua_f, $all, $xigua_data, false);
fclose($xigua_f);
$tiantian_data = get_product(__DIR__ . '/data/tiantian.csv');
$tiantian_f = fopen(__DIR__ . '/data/tiantian.csv', 'w');
$tiantian = json_decode(file_get_contents("http://api.ipzuiduo.com/api/areas?apiid=135&sendtime=" . time() . "&sign=" . md5('apiid=135&sendtime=' . time() . '7dayCFfY6zcwJa6QHtHbGQBRckjJbrbS')), true)['data'];
@@ -258,7 +265,7 @@ function xingxing_getList($data, &$file, &$all, $exit)
}
//极客服务器解析
function jike_getList($data, &$file, &$all, $exit)
function jike_getList($data, &$file, &$all, $exit, $is_jike = true)
{
global $dnx_exit, $dnx_has_exit;
$status = ['yes' => '正常', 'no' => '故障'];
@@ -268,7 +275,11 @@ function jike_getList($data, &$file, &$all, $exit)
$province_record = [];
foreach ($data as $info) {
$record = [];
$record['name'] = '极客';
if($is_jike){
$record['name'] = '极客';
} else {
$record['name'] = '西瓜';
}
//如果存在 不为空 则
if (!in_array($info['province'], $province_record)) {
$record['city'] = $info['province'];