火狐线路

This commit is contained in:
“wanyongkang”
2022-04-14 17:46:56 +08:00
parent d0ed689683
commit 9fa202f23b
2 changed files with 54 additions and 46 deletions

View File

@@ -1,7 +1,7 @@
<?php
function auto_format_list(){
$product_list = [0, 1, 2, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19];
$product_list = [0, 1, 2, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19,22];
foreach ($product_list as $product) {
switch ($product) {
case 0:
@@ -49,6 +49,9 @@ function auto_format_list(){
case 19:
format_product_huohu(__DIR__ . '/data/huohu.csv');
break;
case 22:
format_product(__DIR__ . '/data/huohu.csv');
break;
}
}
}
@@ -106,7 +109,7 @@ function format_all_product($file_path)
$dns = 'mgip.net';
break;
case '火狐':
$dns = 'hhip';
$dns = 'hhip.vip';
break;
default:
$dns = 'xlip.vip';
@@ -128,7 +131,11 @@ function format_all_product($file_path)
$data['nasname'] = '1.hhip.vip';
} else {
$ip = explode('.', ($info[9] ?? ''));
$data['nasname'] = $ip[0] ? ip_repeat($record, $ip[0], $dns) . '.' . $dns : '';
if (count($ip) == 4) {
$data['nasname'] = $info[9];
} else {
$data['nasname'] = $ip[0] ? ip_repeat($record, $ip[0], $dns) . '.' . $dns : '';
}
}
fputcsv($file1, $data);
}