first commit

This commit is contained in:
2022-07-06 10:00:16 +08:00
committed by jhx
commit 54e265dd61
56 changed files with 7491 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace app\controller;
use itbdw\Ip\IpLocation;
use support\Request;
class Index
{
public function index(Request $request)
{
$ip = $request->getRealIp();
$location = IpLocation::getLocation($ip);
return json(['ip' => $ip, 'location' => $location]);
}
}