IP-Adresse + Geolocation
<?php
$ip = $_SERVER['REMOTE_ADDR'];
echo "Deine IP: $ip";
// API für GeoIP
$json = file_get_contents("http://ip-api.com/json/$ip");
$geo = json_decode($json, true);
echo " Land: " . $geo["country"];
?>
IP-Adresse + Geolocation
<?php
$ip = $_SERVER['REMOTE_ADDR'];
echo "Deine IP: $ip";
// API für GeoIP
$json = file_get_contents("http://ip-api.com/json/$ip");
$geo = json_decode($json, true);
echo " Land: " . $geo["country"];
?>