- Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- Parse error: Unmatched ')' in /in/Kp55v on line 3
Process exited with code 255.
<?php
(true)
)
$ip_address = '';
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip_address = $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip_address = $_SERVER['REMOTE_ADDR'];
}
return $ip_address;
}
// Get the client's IP address
$ip_address = get_client_ip();
// Get the client's geolocation information
$geolocation = get_geolocation($ip_address);
// Display the results
echo "Client IP address: $ip_address<br>";
echo "Country: ". $geolocation['country']. "<br>";
echo "City: ". $geolocation['city']. "<br>";
echo "Latitude: ". $geolocation['latitude']. "<br>";
echo "Longitude: ". $geolocation['longitude']. "<br>";