西瓜服务器地址

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

@@ -1,7 +1,7 @@
<?php <?php
function auto_format_list(){ function auto_format_list(){
$product_list = [0, 1, 2, 4, 5, 6, 8, 10, 13, 14, 15, 16]; $product_list = [0, 1, 2, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17];
foreach ($product_list as $product) { foreach ($product_list as $product) {
switch ($product) { switch ($product) {
case 0: case 0:
@@ -40,6 +40,9 @@ function auto_format_list(){
case 15: case 15:
format_product(__DIR__ . '/data/gongxiang.csv', 'shihui'); format_product(__DIR__ . '/data/gongxiang.csv', 'shihui');
break; break;
case 17:
format_product(__DIR__ . '/data/xigua.csv', 'xgip.vip');
break;
} }
} }
} }

View File

@@ -49,6 +49,9 @@ switch ($id) {
case 15: case 15:
get_product(__DIR__ . '/data/download/gongxiang.csv'); get_product(__DIR__ . '/data/download/gongxiang.csv');
break; break;
case 17:
get_product(__DIR__ . '/data/download/xigua.csv');
break;
} }
function get_all_product($file_path) function get_all_product($file_path)

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); jike_getList($jike, $jike_f, $all, $jike_data);
fclose($jike_f); 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_data = get_product(__DIR__ . '/data/tiantian.csv');
$tiantian_f = fopen(__DIR__ . '/data/tiantian.csv', 'w'); $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']; $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; global $dnx_exit, $dnx_has_exit;
$status = ['yes' => '正常', 'no' => '故障']; $status = ['yes' => '正常', 'no' => '故障'];
@@ -268,7 +275,11 @@ function jike_getList($data, &$file, &$all, $exit)
$province_record = []; $province_record = [];
foreach ($data as $info) { foreach ($data as $info) {
$record = []; $record = [];
if($is_jike){
$record['name'] = '极客'; $record['name'] = '极客';
} else {
$record['name'] = '西瓜';
}
//如果存在 不为空 则 //如果存在 不为空 则
if (!in_array($info['province'], $province_record)) { if (!in_array($info['province'], $province_record)) {
$record['city'] = $info['province']; $record['city'] = $info['province'];

View File

@@ -53,6 +53,9 @@ if($_GET['type'] == 1){
case 15: case 15:
search_product(__DIR__.'/data/download/gongxiang.csv','shihui'); search_product(__DIR__.'/data/download/gongxiang.csv','shihui');
break; break;
case 17:
search_product(__DIR__.'/data/download/xigua.csv','xgip.vip');
break;
} }
} }