火狐线路

This commit is contained in:
“wanyongkang”
2022-04-14 18:06:46 +08:00
parent 9fa202f23b
commit 386ceeac70
2 changed files with 11 additions and 2 deletions

View File

@@ -215,7 +215,12 @@ function format_product($file_path, $dns = '')
$data['status'] = $info[8] ?? ''; $data['status'] = $info[8] ?? '';
if ($dns != 'shihui') { if ($dns != 'shihui') {
$ip = explode('.', ($info[9] ?? '')); $ip = explode('.', ($info[9] ?? ''));
if (count($ip) == 4) {
$data['nasname'] = $info[9];
} else {
$data['nasname'] = $ip[0] ? ip_repeat($record, $ip[0]) . '.' . $dns : ''; $data['nasname'] = $ip[0] ? ip_repeat($record, $ip[0]) . '.' . $dns : '';
}
} else { } else {
$data['nasname'] = $info[9] ?? ''; $data['nasname'] = $info[9] ?? '';
} }

View File

@@ -5,7 +5,7 @@
* @Author: kangkang * @Author: kangkang
* @Date: 2020-11-06 14:32:57 * @Date: 2020-11-06 14:32:57
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2020-11-27 10:32:41 * @LastEditTime: 2022-04-14 17:50:48
*/ */
header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Methods: *"); header("Access-Control-Allow-Methods: *");
@@ -58,6 +58,10 @@ switch ($id) {
case 19: case 19:
get_product(__DIR__ . '/data/download/huohu.csv'); get_product(__DIR__ . '/data/download/huohu.csv');
break; break;
case 22:
get_product(__DIR__ . '/data/download/huohu.csv');
break;
} }
function get_all_product($file_path) function get_all_product($file_path)