geoip php sample

Solutions on MaxInterview for geoip php sample by the best coders in the world

showing results for - "geoip php sample"
Catherine
11 Oct 2017
1$ip = $_SERVER['REMOTE_ADDR'];
2$details = json_decode(file_get_contents("http://ipinfo.io/{$ip}/json"));
3echo $details->city; // -> "Mountain View"