php - get city from ip not working on remote server -
get city ip not working on remote server works in localhost. have improve ideas getting city class? server remote addr displays this:
::1
here code i'm using:
class iplocation{ public function ipgetcity(){ $ip=$_server['remote_addr']; $addr_details = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip=’',$ip)); $city = stripslashes(ucfirst($addr_details['geoplugin_city'])); homecoming $city; } }
php get city
No comments:
Post a Comment