From 17e4a692a4a17f5fcfb757cd988ebd95ed66d4b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Tue, 23 Feb 2021 14:54:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=9F=E6=98=9F=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/linedata/get_line_list.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/script/linedata/get_line_list.php b/script/linedata/get_line_list.php index 9fc0700..baea84e 100755 --- a/script/linedata/get_line_list.php +++ b/script/linedata/get_line_list.php @@ -15,7 +15,19 @@ use app\api\model\Product; $product_model = new Product; $product_list = $product_model->field('Id,Token')->fetchAll(); - +// //测试用 +// $xingxing_data = get_product(__DIR__ . '/data/xingxing.csv'); +// $xingxing_f = fopen(__DIR__ . '/data/xingxing.csv', 'w'); +// $time = time(); +// $noce = md5(time()); +// $apikey = 'd50f2b2ffd421efa67df8efb96d5ff6c'; +// $sign = md5($time.$noce.$apikey); +// $url = "http://106.54.198.154/api/getNodeList?agentid=admin1&ti=".$time."&nonce=".$noce."&sign=".$sign; +// $xingxing = json_decode(file_get_contents($url), true)['data']; +// //写入星星文件 +// xingxing_getList($xingxing, $xingxing_f, $all, $xingxing_data); +// fclose($xingxing_f); +// die; $all = fopen(__DIR__ . '/data/all.csv', 'w'); @@ -35,13 +47,13 @@ fclose($qiangzi_f); $xingxing_data = get_product(__DIR__ . '/data/xingxing.csv'); $xingxing_f = fopen(__DIR__ . '/data/xingxing.csv', 'w'); $time = time(); -$noce = 'qiangzijuiphualiankeji'; +$noce = md5(time()); $apikey = 'd50f2b2ffd421efa67df8efb96d5ff6c'; $sign = md5($time.$noce.$apikey); $url = "http://106.54.198.154/api/getNodeList?agentid=admin1&ti=".$time."&nonce=".$noce."&sign=".$sign; -$xingxing = json_decode(file_get_contents($url), true); +$xingxing = json_decode(file_get_contents($url), true)['data']; //写入星星文件 -xingxing_getList($xingxing, $xingxing_f, $all, $xingxing_data)['data']; +xingxing_getList($xingxing, $xingxing_f, $all, $xingxing_data); fclose($xingxing_f); $jike_data = get_product(__DIR__ . '/data/jike.csv');