Skip to content

Instantly share code, notes, and snippets.

View hrnsykk's full-sized avatar

Harun Soykok hrnsykk

View GitHub Profile
$user_ip = getenv('REMOTE_ADDR');
$geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$user_ip"));
$country = $geo["geoplugin_countryName"];
$city = $geo["geoplugin_city"];