Geolocation?

Hi guys

I am looking to build a page (asp) which when loaded by my users will display their location. So, it would simply show their town/city and county (UK).

I’ve read that this is possible by using the user’s browser (or IP) to determine their rough location. I have looked at a multitude of articles but they are extremely complex to someone at my level. All I want to do is simply display the user’s location on my page (ie <%=town%>, <%=county%>).

Is there an easy way to do this via asp?

Any help would be fully appreciated

Best regards

Rod from the UK

1 Like

Using the IP to determine location can be very unreliable, the chances are you will get the country right, but it’s quite common for the town/city to be way off.
There is a geo location API which can be more reliable, but the user has to consent to sharing their location with you.

1 Like

Excellent - thanks Sam!

Much appreciated

Best regards

Rod from the UK

1 Like

I just tried that code from the article again, this time on a computer at work which is on a wired network with static IP. The location it gives is nearly 90 miles away.
When I tried it before, it was at home on laptop using wifi, that was surprisingly accurate with the location.
Neither have GPS, I suppose it was using the wifi signals to work it out.

1 Like

I have a fixed IP address, which an IP look-up service used to show as located in central London. Several months ago, the same service showed me in Derbyshire, IIRC - almost at the centre of England. A couple of months back, I’d apparently moved to somewhere on the south coast of England, only to return again to London, which it gives as my current location.

I (and my Internet connection) have actually never moved from the west coast of Scotland.

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.