<?php
header('Content-Type: text/html; charset=utf-8');
$ip = @$_REQUEST['REMOTE_ADDR']; // the IP address to query
$query = @unserialize(file_get_contents('http://ip-api.com/php/'.$ip));
echo $query['city'];
?>
header('Content-Type: text/html; charset=utf-8');
$ip = @$_REQUEST['REMOTE_ADDR']; // the IP address to query
$query = @unserialize(file_get_contents('http://ip-api.com/php/'.$ip));
echo $query['city'];
?>