From 3c5ea813ed54ee836f71e8af38bdcc4ee3663746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Tue, 19 Jan 2021 16:39:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=85=E8=81=94=E6=8E=A5=E5=8F=A3=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/linedata/get_line_list.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/script/linedata/get_line_list.php b/script/linedata/get_line_list.php index 9e079ca..69415ac 100755 --- a/script/linedata/get_line_list.php +++ b/script/linedata/get_line_list.php @@ -67,12 +67,15 @@ $gongxiang = get_content('http://221.225.83.92:39999/agent/serversList.html', $p gongxiang_getList($gongxiang, $gongxiang_f, $all, $gongxiang_data); fclose($gongxiang_f); -$xunlian_data = get_product(__DIR__ . '/data/xunlian.csv'); -$xunlian_f = fopen(__DIR__ . '/data/xunlian.csv', 'w'); + $xunlian = json_decode(file_get_contents("http://xunyou.ippptp.com:2222/api/areaPool.html?type=json"), true); -//写入讯连文件 -xunlian_getList($xunlian, $xunlian_f, $all, $xunlian_data); -fclose($xunlian_f); +if ($xunlian){ + $xunlian_data = get_product(__DIR__ . '/data/xunlian.csv'); + $xunlian_f = fopen(__DIR__ . '/data/xunlian.csv', 'w'); + //写入讯连文件 + xunlian_getList($xunlian, $xunlian_f, $all, $xunlian_data); + fclose($xunlian_f); +} // $wuxian_data = get_product(__DIR__ . '/data/wuxian.csv'); // $wuxian_f = fopen(__DIR__ . '/data/wuxian.csv', 'w');