Hi All, I have seen on some websites adverts that it can tell the location of the town I am from when viewing. How is this done? What programs or software is used? Can anyone help me as I would like to have this feature on my own website in the UK, anyone that can tell me how this is done I will reward with $5. Thanks
The Location is shown on base of Visitors IP address. if you want this feature in your own website, I would need few more details * Windows or Linux * Shared/VPS/Dedicated * do you have SSH access ?
You can use either Maxmind's Geocity lite database here which is free and a PHP api is available for it: http://www.maxmind.com/app/geolitecity or you can use something even simpler with GeoPlugin to pull back an array of the user's info http://www.geoplugin.com/webservices/php Both of which will allow you to grab the visitor's estimated sity, just one has the data on your server, where as the other one the data is called from a url.
My suggestion Try FEEDJIT'S online showing tool. For more info do google search 'feedjit' To see itz sample check my signature I have used it with my blog!
you can use php script called "ip to city" or use this script for javascript <script type="text/javascript"> function getLocation(){ script = document.createElement('script') script.src = 'http://www.nitinh.com/ip_query.php?callback=initialize' document.body.appendChild(script) } function initialize(obj){ document.getElementById('spanLocation').innerHTML = obj['City'] + ", " + obj['RegionName'] + ", " + obj['CountryName']; } getLocation(); </script> Your current location is: <span id='spanLocation'></span> PHP:
I recommend maxmind as well. Keep in mind though that you can never be certain of anything other than the country though.
why don't u try the real-time visitor api from IPLocationTools.com? I woukld prefer this one than FeedJit