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');