diff --git a/script/linedata/get_line_list.php b/script/linedata/get_line_list.php index a412839..0da36cc 100755 --- a/script/linedata/get_line_list.php +++ b/script/linedata/get_line_list.php @@ -5,14 +5,11 @@ * @Author: kangkang * @Date: 2020-11-03 11:04:15 * @LastEditors: Please set LastEditors - * @LastEditTime: 2021-09-28 11:05:56 + * @LastEditTime: 2021-09-28 11:08:07 */ $is_script = 1; include_once __DIR__ . '/../../index.php'; include_once __DIR__ . '/auto_format.php'; -use app\api\model\Product; -$product_model = new Product; -$product_list = $product_model->field('Id,Token')->fetchAll(); // //测试用---------------------------------------------------------------------------------------------------------- // $laoying = json_decode(file_get_contents("http://diqu.pptp.pro:8070/sapi/getroslist"), true)['list']; @@ -160,20 +157,6 @@ fclose($tiantian_f); } -$gongxiang_data = get_product(__DIR__ . '/data/gongxiang.csv'); -$gongxiang_f = fopen(__DIR__ . '/data/gongxiang.csv', 'w'); -$gongxiang = get_content('http://221.225.83.92:39999/agent/serversList.html', $product_list[14]['Token']); -gongxiang_getList($gongxiang, $gongxiang_f, $all, $gongxiang_data); -fclose($gongxiang_f); - - - -// $wuxian_data = get_product(__DIR__ . '/data/wuxian.csv'); -// $wuxian_f = fopen(__DIR__ . '/data/wuxian.csv', 'w'); -// $wuxian = get_content('http://221.225.83.92:6888/agent/serversList.html', $product_list[9]['Token']); -// //写入无限文件 -// gongxiang_getList($wuxian, $wuxian_f, $all, $wuxian_data, '无限'); -// fclose($wuxian_f); $xianfeng = json_decode(file_get_contents("http://apiserver.pptp.biz/Apiserver/getserver"), true); @@ -1088,27 +1071,6 @@ function jinrui_getList($html, &$file, &$all, $exit) } } -function get_content($url, $cookie) -{ - - $product_model = new Product; - $product_token = $product_model->where(['Id'=>18])->field('Id,Token')->fetch()['Token']; - - $header = [ - 'Authorization: Bearer '.$product_token, - ]; - // print_r($header); - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_HEADER, 0); - curl_setopt($ch, CURLOPT_HTTPHEADER, $header); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_COOKIE, $cookie); //读取cookie - $rs = curl_exec($ch); //执行cURL抓取页面内容 - // print_r($rs); - curl_close($ch); - return $rs; -} function get_product($file_path, $num = 9) {