This is a service I just started testing recently. It's free, so I thought some of you here might find it useful.
Just go to the site telize.com for details on usage. Its pretty simple, just call their script and write out whatever variables you need.
It can display ip, city, country_code, latitude, area_code and so on.
I am only using it for city.
To use, here is their example:
<script type="application/javascript">
function getgeoip(json){
document.write("Geolocation information for IP address : ", json.ip);
document.write("Country : ", json.country);
document.write("Latitude : ", json.latitude);
document.write("Longitude : ", json.longitude);
}
</script>
<script type="application/javascript" src="http://www.telize.com/geoip?callback=getgeoip"></script>
<script type="application/javascript">
var cityString = '';
function getgeoip(json){
cityString = json.city;
}
</script>
<script type="application/javascript" src="http://www.telize.com/geoip?callback=getgeoip"></script>