Answers for "geoip php library"

PHP
0

geoip php sample

$ip = $_SERVER['REMOTE_ADDR'];
$details = json_decode(file_get_contents("http://ipinfo.io/{$ip}/json"));
echo $details->city; // -> "Mountain View"
Posted by: Guest on May-11-2020

Browse Popular Code Answers by Language