diff --git a/ip-info/index.php b/ip-info/index.php index cd8bba7..c2608c5 100644 --- a/ip-info/index.php +++ b/ip-info/index.php @@ -23,8 +23,19 @@ $client_ip = $_SERVER['REMOTE_ADDR']; $client_hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); + $token = "your_token_here"; + $request_url = file_get_contents("https://ipinfo.io/" . $client_ip . "/json/?token=" . $token); + $json = json_decode($request_url); + echo "
IP Address: $client_ip
"; echo "Hostname: $client_hostname
"; + echo "ISP: " . $json->org, "
"; + echo "City: " . $json->city, "
"; + echo "Region: " . $json->region, "
"; + echo "Country: " . $json->country, "
"; + echo "Coordinates: " . $json->loc, "
"; + echo "Postal Code: " . $json->postal, "
"; + echo "Timezone: " . $json->timezone, "
"; ?>