From 7bc2682a2b5804f4cdf2776ba7afe70f32ceaf2b Mon Sep 17 00:00:00 2001 From: hellcat Date: Wed, 30 Sep 2026 14:47:31 +0800 Subject: [PATCH] no message --- app/Http/Controllers/CronController.php | 12 ++++++++---- app/Http/Controllers/CronV2Controller.php | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/CronController.php b/app/Http/Controllers/CronController.php index 0922109..7a129e1 100755 --- a/app/Http/Controllers/CronController.php +++ b/app/Http/Controllers/CronController.php @@ -69,7 +69,7 @@ class CronController return $sMsg; } - $tmp = str_replace("T", " ", rtrim($aGitHub["updated_at"], "Z")); //updated_at, pushed_at + $tmp = str_replace("T", " ", rtrim($aGitHub["pushed_at"], "Z")); //updated_at, pushed_at $tmp = strtotime($tmp); $tmpDate = date("Y-m-d H:i:s", $tmp + (8 * 3600)); $tmpTime = strtotime($tmpDate); @@ -272,7 +272,8 @@ class CronController $oHttp = new Http(); $oHttp->sMethod = "get"; // $sMasterUrl = env("api_url_freenode_base")."/api/github/getfntoday/".$sFnCode; - $sMasterUrl = "https://".$row["fn_www"]."/api/github/getfntoday/".$sFnCode; +// $sMasterUrl = "https://".$row["fn_www"]."/api/github/getfntoday/".$sFnCode; + $sMasterUrl = "https://".env("www_master")."/api/v1/freenode/url_feed_today/".$row["fn_code_short"] ?? 'cfn'; $sReturn = $oHttp->send($sMasterUrl); $aReturn = json_decode($sReturn, true); @@ -285,8 +286,11 @@ class CronController } if ($aReturn["code"] == "100") { - file_put_contents($this->sProjectPath."/feed/clash-".$sFnCode.".yaml", $aReturn["clash"]); - file_put_contents($this->sProjectPath."/feed/v2ray-".$sFnCode.".txt", $aReturn["v2ray"]); + file_put_contents($this->sProjectPath."/feed/clash-".$sFnCode.".yaml", file_get_contents("https://".$aReturn["data"]["clash"])); + file_put_contents($this->sProjectPath."/feed/v2ray-".$sFnCode.".txt", file_get_contents("https://".$aReturn["data"]["v2ray"])); +// file_put_contents($this->sProjectPath."/feed/singbox-".$sFnCode.".txt", file_get_contents("https://".$aReturn["data"]["singbox"])); +// file_put_contents($this->sProjectPath."/feed/clash-".$sFnCode.".yaml", $aReturn["clash"]); +// file_put_contents($this->sProjectPath."/feed/v2ray-".$sFnCode.".txt", $aReturn["v2ray"]); } // 写入内容 diff --git a/app/Http/Controllers/CronV2Controller.php b/app/Http/Controllers/CronV2Controller.php index 3113001..92e8c5b 100755 --- a/app/Http/Controllers/CronV2Controller.php +++ b/app/Http/Controllers/CronV2Controller.php @@ -69,7 +69,7 @@ class CronV2Controller return $sMsg; } - $tmp = str_replace("T", " ", rtrim($aGitHub["updated_at"], "Z")); //updated_at, pushed_at + $tmp = str_replace("T", " ", rtrim($aGitHub["pushed_at"], "Z")); //updated_at, pushed_at $tmp = strtotime($tmp); $tmpDate = date("Y-m-d H:i:s", $tmp + (8 * 3600)); $tmpTime = strtotime($tmpDate);