1
0
Эх сурвалжийг харах

Remove prefix on IPv6-mapped IPv4 (#109)

mildis 8 жил өмнө
parent
commit
d9b551c5c8
1 өөрчлөгдсөн 1 нэмэгдсэн , 0 устгасан
  1. 1 0
      getIP.php

+ 1 - 0
getIP.php

@@ -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");