When user comes on my page, I get his IP.
Using IP I can get his lang-latt. (Still could not finalized which API is best for this)
Now I have total 6 cities of India. Blore, Mumbai, pune, Hbad, delhi, chennai and their Lang-latt.
Based on his current location I need to find nearest city.
One way is getting distance of all 6 cities from user's current location, one which has min distance, select that city. This distance would be calculated by lang-latt difference using
Haversine_formula. I appreciate some one tell me it's accuracy level.
To get user's current lang-latt I am using ipinfodb API ;
http://api.ipinfodb.com/v3/ip-country/?key=<your_api_key>&ip=74.125.45.100Is there any better way or API to do this more accurately?