I want to be able to determine just what country a person is in (on Android, without using the GPS), so I was thinking to use a web API, that I can call and it will return the country based on the request IP. But I can't find any web API that does this, does any exist?
Asked
Active
Viewed 323 times
1
-
A Generic solution would be to find the location irrespective of the users IP Address. – Yauraw Gadav Dec 25 '12 at 04:54
4 Answers
0
You can use Google place API look at here just pass the parameters and you will get response in json/xml

Sunny
- 14,522
- 15
- 84
- 129
-
The problem with that is that it seems to require an input. I want the input to just be the request IP, which I don't need to provide as that's just part of the header. – Amandeep Grewal Dec 25 '12 at 04:38
-
1http://stackoverflow.com/questions/4453328/get-location-of-wifi-ip-in-android – Sunny Dec 25 '12 at 04:40
-1
You need a database to do that and proxy servers will just frustrate your intent

Bé Cu Sữa
- 19
- 3
-
I don't care if the user tries to fake their IP, or using a proxy to seem that there are somewhere they're not. – Amandeep Grewal Dec 25 '12 at 04:35
-1

Community
- 1
- 1

Yauraw Gadav
- 1,706
- 1
- 18
- 39
-
This seems to use the cell tower information, which you don't necessarily need to know. IP address is simpler for my case. – Amandeep Grewal Dec 25 '12 at 05:01
-
-
-1
I ended up using http://www.ipinfodb.com/ip_location_api.php, which fits all the needs I specified in the question.

Amandeep Grewal
- 1,801
- 3
- 19
- 30