From 9efc042f4739e82ba2d335acec6f647f65e2b166 Mon Sep 17 00:00:00 2001 From: woon Date: Wed, 6 Jul 2022 10:49:18 +0800 Subject: [PATCH] update --- app/controller/Index.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controller/Index.php b/app/controller/Index.php index 0d813d0..f2b9660 100644 --- a/app/controller/Index.php +++ b/app/controller/Index.php @@ -11,6 +11,10 @@ class Index { $ip = $request->getRealIp(); + if ($check = $request->get('ip')) { + $ip = gethostbyname($check); + } + $filepath = '/usr/src/myapp/lib/qqwry.dat'; $location = IpLocation::getLocation($ip, $filepath);