$ip=$_SERVER['REMOTE_ADDR'];
$addr_details = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.$ip));
echo $city = stripslashes(ucfirst($addr_details[geoplugin_city]));
echo $countrycode = stripslashes(ucfirst($addr_details[geoplugin_countryCode]));
echo $country = stripslashes(ucfirst($addr_details[geoplugin_countryName]));
No comments:
Post a Comment