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);