From 81ae16a428543446f43fe8fd816c411557c6afbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Mon, 23 Oct 2023 16:58:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=91=E7=89=9B=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/linedata/get_line_list.php | 76 +++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 25 deletions(-) diff --git a/script/linedata/get_line_list.php b/script/linedata/get_line_list.php index c484880..008d430 100755 --- a/script/linedata/get_line_list.php +++ b/script/linedata/get_line_list.php @@ -5,7 +5,7 @@ * @Author: kangkang * @Date: 2020-11-03 11:04:15 * @LastEditors: “wanyongkang” “937888580@qq.com” - * @LastEditTime: 2023-10-23 15:54:05 + * @LastEditTime: 2023-10-23 16:58:20 */ $is_script = 1; include_once __DIR__ . '/../../index.php'; @@ -13,16 +13,20 @@ include_once __DIR__ . '/auto_format.php'; // // //测试用---------------------------------------------------------------------------------------------------------- +///动态 +// $url = 'http://int.linghangsoft.net:8000/sysadmin/useradmin/lineapi_admin1.php?secretId=108006113&secretKey=87085a351a64c116df09ebc07d5781sf'; +// $yunniu = json_decode(file_get_contents($url), true); -// $laoying = json_decode(file_get_contents("http://diqu.pptp.pro:8070/sapi/getroslist"), true)['list']; -// if($laoying){ -// $laoying_data = get_product(__DIR__ . '/data/laoying.csv'); -// $laoying_f = fopen(__DIR__ . '/data/laoying.csv', 'w'); -// //写入老鹰文件 -// laoying_getList($laoying, $laoying_f, $all, $laoying_data); -// fclose($laoying_f); +// if(!empty($yunniu)){ +// $yunniu_f = fopen(__DIR__ . '/data/yunniu.csv', 'w'); +// //写入火狐文件 +// $yunniu_data = get_product(__DIR__ . '/data/yunniu.csv'); +// yunniu_getList($yunniu, $yunniu_f, $all,$yunniu_data); +// fclose($yunniu_f); // } + + // die; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //强子迅联特征码 @@ -117,26 +121,26 @@ $url = 'http://int.linghangadmin.com:8000/sysadmin/useradmin/lineapi_admin1.php? $huohu = json_decode(file_get_contents($url), true); -// if(!empty($huohu)){ -// $huohu_f = fopen(__DIR__ . '/data/huohu.csv', 'w'); -// //写入火狐文件 -// $huohu_data = get_product(__DIR__ . '/data/huohu.csv'); -// huohu_getList($huohu, $huohu_f, $all,$huohu_data); -// fclose($huohu_f); -// } +if(!empty($huohu)){ + $huohu_f = fopen(__DIR__ . '/data/huohu.csv', 'w'); + //写入火狐文件 + $huohu_data = get_product(__DIR__ . '/data/huohu.csv'); + huohu_getList($huohu, $huohu_f, $all,$huohu_data); + fclose($huohu_f); +} -// ///动态 -// $url = 'http://int.linghangsoft.net:8000/sysadmin/useradmin/lineapi_admin1.php?secretId=108006113&secretKey=87085a351a64c116df09ebc07d5781sf'; -// $yunniu = json_decode(file_get_contents($url), true); +///动态 +$url = 'http://int.linghangsoft.net:8000/sysadmin/useradmin/lineapi_admin1.php?secretId=108006113&secretKey=87085a351a64c116df09ebc07d5781sf'; +$yunniu = json_decode(file_get_contents($url), true); -// if(!empty($yunniu)){ -// $yunniu_f = fopen(__DIR__ . '/data/yunniu.csv', 'w'); -// //写入火狐文件 -// $yunniu_data = get_product(__DIR__ . '/data/yunniu.csv'); -// yunniu_getList($yunniu, $yunniu_f, $all,$yunniu_data); -// fclose($yunniu_f); -// } +if(!empty($yunniu)){ + $yunniu_f = fopen(__DIR__ . '/data/yunniu.csv', 'w'); + //写入火狐文件 + $yunniu_data = get_product(__DIR__ . '/data/yunniu.csv'); + yunniu_getList($yunniu, $yunniu_f, $all,$yunniu_data); + fclose($yunniu_f); +} @@ -428,6 +432,17 @@ function huohu_getList($data, &$file, &$all, $exit) fputcsv($dnx_exit, ['火狐', explode('.',$record['nasname'])[0], $record['nasname'], date('Y-m-d H:i:s')]); } } + $temp = []; + foreach ($list as $key=>$val) { + if ($key == '全国') { + $temp = $val; + unset($list['全国']); + } + } + array_unshift($list,$temp); + + + foreach ($list as $val) { foreach ($val as $net_data) { @@ -476,6 +491,17 @@ function yunniu_getList($data, &$file, &$all, $exit) fputcsv($dnx_exit, ['火狐', explode('.',$record['nasname'])[0], $record['nasname'], date('Y-m-d H:i:s')]); } } + $temp = []; + foreach ($list as $key=>$val) { + if ($key == '全国') { + $temp = $val; + unset($list['全国']); + } + } + array_unshift($list,$temp); + + + foreach ($list as $val) { foreach ($val as $net_data) {