极光ip线路

This commit is contained in:
“wanyongkang”
2024-11-07 15:23:36 +08:00
parent e24f39e116
commit 9e03ee42b6
4 changed files with 161 additions and 88 deletions

View File

@@ -20,44 +20,42 @@ ini_set("display_errors", 0);
// // //测试用----------------------------------------------------------------------------------------------------------
// $shuidi = new Jinyoujt;
// $url = "https://www.jyip.net/static-list";
// $shuidi_api_data = json_decode(file_get_contents($url),true)['data'];
// if ($shuidi_api_data) {
// $shuidi_data = get_product(__DIR__ . '/data/shuidi.csv');
// $shuidi_f = fopen(__DIR__ . '/data/shuidi.csv', 'w');
// shuidi_getList($shuidi_api_data, $shuidi_f, $all,$shuidi_data);
// fclose($shuidi_f);
//极光
// $url = "http://106.119.166.87:18702/api/agent/getList2?apikey=80cf4f64e990b78a9fc5eb";
// $jiguang = json_decode(file_get_contents($url), true)['data'];
// if ($jiguang) {
// $jiguang_f = fopen(__DIR__ . '/data/jiguang.csv', 'w');
// jiguang_getList($jiguang, $jiguang_f, $all);
// fclose($jiguang_f);
// }
// die;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$dnx_has_exit = [];
//强子迅联特征码
$sp_xl_code = file_get_contents(__DIR__ . '/data/xl.txt', 'r');
// //强子迅联特征码
// $sp_xl_code = file_get_contents(__DIR__ . '/data/xl.txt', 'r');
// echo $sp_xl_code;
// // echo $sp_xl_code;
$sp_xl_json = json_decode(substr($sp_xl_code,3),true);
$sp_xl_list = [];
foreach($sp_xl_json as $k=>$v){
$temp = explode('-',$k);
$sp_xl_list[$temp[1]] = $v;
}
// $sp_xl_json = json_decode(substr($sp_xl_code,3),true);
// $sp_xl_list = [];
// foreach($sp_xl_json as $k=>$v){
// $temp = explode('-',$k);
// $sp_xl_list[$temp[1]] = $v;
// }
$sp_qz_code = file_get_contents(__DIR__ . '/data/qz.txt', 'r');
// $sp_qz_code = file_get_contents(__DIR__ . '/data/qz.txt', 'r');
// echo $sp_qz_code;
// // echo $sp_qz_code;
$sp_qz_json = json_decode(substr($sp_qz_code,3),true);
$sp_qz_list = [];
foreach($sp_qz_json as $k=>$v){
$temp = explode('-',$k);
$sp_qz_list[$temp[1]] = $v;
}
// $sp_qz_json = json_decode(substr($sp_qz_code,3),true);
// $sp_qz_list = [];
// foreach($sp_qz_json as $k=>$v){
// $temp = explode('-',$k);
// $sp_qz_list[$temp[1]] = $v;
// }
//--------------------------------------------
$all = fopen(__DIR__ . '/data/all.csv', 'w');
@@ -74,6 +72,15 @@ if ($jihu) {
fclose($jihu_f);
}
//极光
$url = "http://106.119.166.87:18702/api/agent/getList2?apikey=80cf4f64e990b78a9fc5eb";
$jiguang = json_decode(file_get_contents($url), true)['data'];
if ($jiguang) {
$jiguang_f = fopen(__DIR__ . '/data/jiguang.csv', 'w');
jiguang_getList($jiguang, $jiguang_f, $all);
fclose($jiguang_f);
}
$apikey = '80cf4f64e990b78a9fc5eb';
$url = "http://rds-api.juip.com/api/index/getList2?apikey=".$apikey;
@@ -111,50 +118,50 @@ liebao_getList($liebao, $liebao_f, $all, $liebao_data, '猎豹');
fclose($liebao_f);
}
//先锋
$xianfeng = json_decode(file_get_contents("http://service.shenlongip.com/api/server/getlist"), true)['P'];
// //先锋
// $xianfeng = json_decode(file_get_contents("http://service.shenlongip.com/api/server/getlist"), true)['P'];
if($xianfeng){
$xianfeng_data = get_product(__DIR__ . '/data/xianfeng.csv');
$xianfeng_f = fopen(__DIR__ . '/data/xianfeng.csv', 'w');
//写入先锋文件
xianfeng_getList($xianfeng, $xianfeng_f, $all, $xianfeng_data);
fclose($xianfeng_f);
}
// if($xianfeng){
// $xianfeng_data = get_product(__DIR__ . '/data/xianfeng.csv');
// $xianfeng_f = fopen(__DIR__ . '/data/xianfeng.csv', 'w');
// //写入先锋文件
// xianfeng_getList($xianfeng, $xianfeng_f, $all, $xianfeng_data);
// fclose($xianfeng_f);
// }
$time = time();
$noce = md5(time());
$apikey = 'a478ad5aa3079bbbef3cd45e2d55d61e';
$sign = md5($time.$noce.$apikey);
$url = "http://47.92.116.14:2222/api/getNodeList?agentid=admin1&ti=".$time."&nonce=".$noce."&sign=".$sign;
$qiangzi = json_decode(file_get_contents($url), true)['data'];
if(!empty($qiangzi)){
$qiangzi_data = get_product(__DIR__ . '/data/qiangzi.csv');
$qiangzi_f = fopen(__DIR__ . '/data/qiangzi.csv', 'w');
// $time = time();
// $noce = md5(time());
// $apikey = 'a478ad5aa3079bbbef3cd45e2d55d61e';
// $sign = md5($time.$noce.$apikey);
// $url = "http://47.92.116.14:2222/api/getNodeList?agentid=admin1&ti=".$time."&nonce=".$noce."&sign=".$sign;
// $qiangzi = json_decode(file_get_contents($url), true)['data'];
// if(!empty($qiangzi)){
// $qiangzi_data = get_product(__DIR__ . '/data/qiangzi.csv');
// $qiangzi_f = fopen(__DIR__ . '/data/qiangzi.csv', 'w');
//写入强子文件
qiangzi_getList($qiangzi, $qiangzi_f, $all, $qiangzi_data);
fclose($qiangzi_f);
}
// //写入强子文件
// qiangzi_getList($qiangzi, $qiangzi_f, $all, $qiangzi_data);
// fclose($qiangzi_f);
// }
$time = time();
$noce = md5(time());
$apikey = 'osoa917321hdjw';
$sign = md5($time.$noce.$apikey);
$url = "http://47.92.65.184:2223/api/getNodeList?agentid=admin2&ti=".$time."&nonce=".$noce."&sign=".$sign;
$xunlian = json_decode(file_get_contents($url), true)['data'];
// $xunlian = false;
if ($xunlian){
$xunlian_data = get_product(__DIR__ . '/data/xunlian.csv');
$xunlian_f = fopen(__DIR__ . '/data/xunlian.csv', 'w');
//写入讯连文件
xunlian_getList($xunlian, $xunlian_f, $all, $xunlian_data);
fclose($xunlian_f);
}
// $time = time();
// $noce = md5(time());
// $apikey = 'osoa917321hdjw';
// $sign = md5($time.$noce.$apikey);
// $url = "http://47.92.65.184:2223/api/getNodeList?agentid=admin2&ti=".$time."&nonce=".$noce."&sign=".$sign;
// $xunlian = json_decode(file_get_contents($url), true)['data'];
// // $xunlian = false;
// if ($xunlian){
// $xunlian_data = get_product(__DIR__ . '/data/xunlian.csv');
// $xunlian_f = fopen(__DIR__ . '/data/xunlian.csv', 'w');
// //写入讯连文件
// xunlian_getList($xunlian, $xunlian_f, $all, $xunlian_data);
// fclose($xunlian_f);
// }
///动态
$url = 'http://int.linghangsoft.net:8000/sysadmin/useradmin/lineapi_admin1.php?secretId=108006113&secretKey=87085a351a64c116df09ebc07d5781sf';
@@ -169,32 +176,32 @@ if(!empty($yunniu)){
fclose($yunniu_f);
}
$xigua = json_decode(file_get_contents("http://api.beikeip.com/serverlistyzip/"), true)['data'];
if($xigua){
$xigua_data = get_product(__DIR__ . '/data/xigua.csv');
$xigua_f = fopen(__DIR__ . '/data/xigua.csv', 'w');
//写入西瓜文件
jike_getList($xigua, $xigua_f, $all, $xigua_data, false);
fclose($xigua_f);
}
// $xigua = json_decode(file_get_contents("http://api.beikeip.com/serverlistyzip/"), true)['data'];
// if($xigua){
// $xigua_data = get_product(__DIR__ . '/data/xigua.csv');
// $xigua_f = fopen(__DIR__ . '/data/xigua.csv', 'w');
// //写入西瓜文件
// jike_getList($xigua, $xigua_f, $all, $xigua_data, false);
// fclose($xigua_f);
// }
$tiantian = json_decode(file_get_contents("https://yoyoapi.yoyoip.com/v1/areas?apiid=89&sendtime=" . time() . "&sign=" . md5('apiid=89&sendtime=' . time() . 'NFeK72yYXmPiGR86YeMCBRTWDxXkrQsd')), true)['data'];
if($tiantian){
$tiantian_data = get_product(__DIR__ . '/data/tiantian.csv');
$tiantian_f = fopen(__DIR__ . '/data/tiantian.csv', 'w');
//写入天天文件
tiantian_getList($tiantian, $tiantian_f, $all, $tiantian_data, '天天');
fclose($tiantian_f);
}
// $tiantian = json_decode(file_get_contents("https://yoyoapi.yoyoip.com/v1/areas?apiid=89&sendtime=" . time() . "&sign=" . md5('apiid=89&sendtime=' . time() . 'NFeK72yYXmPiGR86YeMCBRTWDxXkrQsd')), true)['data'];
// if($tiantian){
// $tiantian_data = get_product(__DIR__ . '/data/tiantian.csv');
// $tiantian_f = fopen(__DIR__ . '/data/tiantian.csv', 'w');
// //写入天天文件
// tiantian_getList($tiantian, $tiantian_f, $all, $tiantian_data, '天天');
// fclose($tiantian_f);
// }
$jike = json_decode(file_get_contents("http://api.beikeip.com/beikeiplist/"), true)['data'];
if($jike){
$jike_data = get_product(__DIR__ . '/data/jike.csv');
$jike_f = fopen(__DIR__ . '/data/jike.csv', 'w');
//写入极客文件
jike_getList($jike, $jike_f, $all, $jike_data);
fclose($jike_f);
}
// $jike = json_decode(file_get_contents("http://api.beikeip.com/beikeiplist/"), true)['data'];
// if($jike){
// $jike_data = get_product(__DIR__ . '/data/jike.csv');
// $jike_f = fopen(__DIR__ . '/data/jike.csv', 'w');
// //写入极客文件
// jike_getList($jike, $jike_f, $all, $jike_data);
// fclose($jike_f);
// }
//水滴
@@ -899,6 +906,57 @@ function jihu_getList($data, &$file, &$all )
}
//极光服务器解析规则
function jiguang_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 )
{