Remove prefix on IPv6-mapped IPv4 (#109)

This commit is contained in:
mildis 2018-02-17 13:06:18 +01:00 committed by Federico Dossena
parent a883adbbe7
commit d9b551c5c8

View file

@ -10,6 +10,7 @@
} else {
$ip=$_SERVER['REMOTE_ADDR'];
}
$ip=preg_replace("/^::ffff:/", "", $ip);
$isp="";
if(isset($_GET["isp"])){
$json = file_get_contents("https://ipinfo.io/".$ip."/json");