I noticed all of the craziness with databases, php files and other bs that everyone is employing to GEO target. I thought that there has to be a better way, and I found it. This is a simple Javascript that pulls the info from google and shows it on your page. I did not write this script, I just found it posted and wanted to save some peeps alot of time and trouble. Here it is:
Just paste it in your HTML page and let it do the work!
Cheers
<script type="text/javascript" src="http://www.google.com/jsapi"> </script>
<script type="text/javascript">
if (typeof(google.loader.ClientLocation.address.city) != null) {
document.write(google.loader.ClientLocation.address.city
+", "
+google.loader.ClientLocation.address.region);
} else {
document.write("Unknown location")
}
</script>
Just paste it in your HTML page and let it do the work!
Cheers