From ea01e93fe904c575bed72852d4958c8b505e4245 Mon Sep 17 00:00:00 2001 From: Enoch Date: Thu, 7 Nov 2024 18:24:42 +0800 Subject: [PATCH 1/2] enoch --- runtime/logs/workerman.log | 6 ++++++ runtime/sessions/session_a373f3e43bcad9411f9dc3bdb52b0ab6 | 2 +- start.php | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/runtime/logs/workerman.log b/runtime/logs/workerman.log index 0f1f48a..769bebe 100644 --- a/runtime/logs/workerman.log +++ b/runtime/logs/workerman.log @@ -136,3 +136,9 @@ 2024-11-05 16:54:59 pid:1636 Workerman[start.php] start in DEBUG mode 2024-11-05 16:55:00 pid:1636 Workerman[start.php] stopping ... 2024-11-05 16:55:00 pid:1636 Workerman[start.php] has been stopped +2024-11-07 18:21:20 pid:9866 Workerman[start.php] start in DEBUG mode +2024-11-07 18:23:59 pid:9866 Workerman[start.php] stopping ... +2024-11-07 18:23:59 pid:9866 Workerman[start.php] has been stopped +2024-11-07 18:24:36 pid:11244 Workerman[start.php] start in DEBUG mode +2024-11-07 18:24:39 pid:11244 Workerman[start.php] stopping ... +2024-11-07 18:24:39 pid:11244 Workerman[start.php] has been stopped diff --git a/runtime/sessions/session_a373f3e43bcad9411f9dc3bdb52b0ab6 b/runtime/sessions/session_a373f3e43bcad9411f9dc3bdb52b0ab6 index 459e377..18d1739 100644 --- a/runtime/sessions/session_a373f3e43bcad9411f9dc3bdb52b0ab6 +++ b/runtime/sessions/session_a373f3e43bcad9411f9dc3bdb52b0ab6 @@ -1 +1 @@ -a:3:{s:7:"captcha";s:5:"sq8y4";s:4:"user";s:5:"enoch";s:8:"realname";s:9:"以诺书";} \ No newline at end of file +a:1:{s:7:"captcha";s:5:"sq8y4";} \ No newline at end of file diff --git a/start.php b/start.php index 489e447..1113b0a 100755 --- a/start.php +++ b/start.php @@ -1,4 +1,5 @@ #!/usr/bin/env php Date: Thu, 7 Nov 2024 21:44:19 +0800 Subject: [PATCH 2/2] Fix Bug --- app/controller/Server.php | 8 ++++++-- runtime/logs/workerman.log | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/controller/Server.php b/app/controller/Server.php index 9323a56..2841d02 100644 --- a/app/controller/Server.php +++ b/app/controller/Server.php @@ -26,8 +26,12 @@ class Server } $realname=$session->get('realname',null); - $domain=$url; - $domain_name=parse_url($url)['host']; + if(str_starts_with($url, 'http://')||str_starts_with($url, 'https://')){ + $domain=$url; + }else{ + $domain='http://'.$url; + } + $domain_name=parse_url($domain)['host']; $response = Http::post('https://api.uutool.cn/beian/icp/', ['site' => "$domain"])->json(); diff --git a/runtime/logs/workerman.log b/runtime/logs/workerman.log index 769bebe..1bd1077 100644 --- a/runtime/logs/workerman.log +++ b/runtime/logs/workerman.log @@ -142,3 +142,7 @@ 2024-11-07 18:24:36 pid:11244 Workerman[start.php] start in DEBUG mode 2024-11-07 18:24:39 pid:11244 Workerman[start.php] stopping ... 2024-11-07 18:24:39 pid:11244 Workerman[start.php] has been stopped +2024-11-07 21:43:27 pid:46886 Workerman[start.php] start in DEBUG mode +2024-11-07 21:43:52 pid:46886 Workerman[start.php] reloading +2024-11-07 21:44:17 pid:46886 Workerman[start.php] stopping ... +2024-11-07 21:44:17 pid:46886 Workerman[start.php] has been stopped