Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

geoip php sample

$ip = $_SERVER['REMOTE_ADDR'];
$details = json_decode(file_get_contents("http://ipinfo.io/{$ip}/json"));
echo $details->city; // -> "Mountain View"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #geoip #php #sample
ADD COMMENT
Topic
Name
9+6 =