This commit is contained in:
“wanyongkang”
2022-04-28 17:43:45 +08:00
parent b15188fc6e
commit 0d0572f1ed
4 changed files with 52 additions and 18 deletions

View File

@@ -5,7 +5,7 @@
* @Author: kangkang
* @Date: 2020-11-03 11:04:15
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-14 18:27:27
* @LastEditTime: 2022-04-28 17:39:37
*/
$is_script = 1;
include_once __DIR__ . '/../../index.php';
@@ -13,18 +13,20 @@ include_once __DIR__ . '/auto_format.php';
// //测试用----------------------------------------------------------------------------------------------------------
// $url = 'http://int.linghangadmin.com:8000/sysadmin/useradmin/lineapi_admin1.php?secretId=108006113&secretKey=87085a351a64c116df09ebc07d5781sf';
// $huohu = json_decode(file_get_contents($url), true);
$url = 'http://int.linghangsoft.net:8000/sysadmin/useradmin/lineapi_admin1.php?secretId=108006113&secretKey=87085a351a64c116df09ebc07d5781sf';
$liebao = 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);
// }
// die;
if(!empty($liebao)){
$liebao_f = fopen(__DIR__ . '/data/liebao.csv', 'w');
//写入火狐文件
$liebao_data = get_product(__DIR__ . '/data/liebao.csv');
huohu_getList($liebao, $liebao_f, $all,$liebao_data);
fclose($liebao_f);
}
die;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//强子迅联特征码
$sp_xl_code = file_get_contents(__DIR__ . '/data/xl.txt', 'r');
@@ -109,6 +111,21 @@ if(!empty($huohu)){
fclose($huohu_f);
}
///动态
$url = 'http://int.linghangsoft.net:8000/sysadmin/useradmin/lineapi_admin1.php?secretId=108006113&secretKey=87085a351a64c116df09ebc07d5781sf';
$liebao = json_decode(file_get_contents($url), true);
if(!empty($liebao)){
$liebao_f = fopen(__DIR__ . '/data/liebao.csv', 'w');
//写入火狐文件
$liebao_data = get_product(__DIR__ . '/data/liebao.csv');
huohu_getList($liebao, $liebao_f, $all,$liebao_data);
fclose($liebao_f);
}
$time = time();
$noce = md5(time());
@@ -278,7 +295,7 @@ function huohu_getList($data, &$file, &$all, $exit)
$province_record = [];
foreach ($data as $info){
$record = [];
$record['name'] = '火狐';
$record['name'] = '猎豹';
//如果存在 不为空 则
if (!in_array( $info['province'], $province_record)) {
$record['city'] = $info['province'];
@@ -302,7 +319,7 @@ function huohu_getList($data, &$file, &$all, $exit)
$list[$key][] = $record;
if (!in_array($record['nasname'], $exit) && !in_array($record['nasname'], $dnx_has_exit)) {
fputcsv($dnx_exit, ['强子', explode('.',$record['nasname'])[0], $record['nasname'], date('Y-m-d H:i:s')]);
fputcsv($dnx_exit, ['火狐', explode('.',$record['nasname'])[0], $record['nasname'], date('Y-m-d H:i:s')]);
}
}
foreach ($list as $val) {