This commit is contained in:
2022-07-06 10:49:18 +08:00
committed by jhx
parent 7584862d98
commit 9efc042f47
+4
View File
@@ -11,6 +11,10 @@ class Index
{ {
$ip = $request->getRealIp(); $ip = $request->getRealIp();
if ($check = $request->get('ip')) {
$ip = gethostbyname($check);
}
$filepath = '/usr/src/myapp/lib/qqwry.dat'; $filepath = '/usr/src/myapp/lib/qqwry.dat';
$location = IpLocation::getLocation($ip, $filepath); $location = IpLocation::getLocation($ip, $filepath);