西瓜服务器地址
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
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) {
|
||||
switch ($product) {
|
||||
case 0:
|
||||
@@ -40,6 +40,9 @@ function auto_format_list(){
|
||||
case 15:
|
||||
format_product(__DIR__ . '/data/gongxiang.csv', 'shihui');
|
||||
break;
|
||||
case 17:
|
||||
format_product(__DIR__ . '/data/xigua.csv', 'xgip.vip');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,9 @@ switch ($id) {
|
||||
case 15:
|
||||
get_product(__DIR__ . '/data/download/gongxiang.csv');
|
||||
break;
|
||||
case 17:
|
||||
get_product(__DIR__ . '/data/download/xigua.csv');
|
||||
break;
|
||||
}
|
||||
|
||||
function get_all_product($file_path)
|
||||
|
||||
@@ -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'];
|
||||
|
||||
@@ -53,6 +53,9 @@ if($_GET['type'] == 1){
|
||||
case 15:
|
||||
search_product(__DIR__.'/data/download/gongxiang.csv','shihui');
|
||||
break;
|
||||
case 17:
|
||||
search_product(__DIR__.'/data/download/xigua.csv','xgip.vip');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user