views:

123

answers:

1

Hi,

I would like to get the City name,Country Name from IPAddress. I have used the below URL http://www.ipgp.net/api/xml/220.244.120.73.

But in the City field, its giving Area name. For eg,when the user is in Sydney,Australia. Its giving as Mascot,Australia where Mascot is a place in Sydney.

Can you please advise.

Regards, Mugil.

+1  A: 

This is usually not possible, because ISPs don't publicize such detailed information. (IP-based Geolocation services work a lot with guesses and hazy algorithms in the first place.) The more exact the geolocation, the more this would also become a privacy problem.

If you need such detailed information, consider the new HTML 5 Geolocation API that allows visitors to disclose location information voluntarily.

Pekka