Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/egbakou/user-location
Get user's country name and country fag based on his ip address
https://github.com/egbakou/user-location
country-flags country-names javascript jquery location tracking
Last synced: 24 days ago
JSON representation
Get user's country name and country fag based on his ip address
- Host: GitHub
- URL: https://github.com/egbakou/user-location
- Owner: egbakou
- Created: 2019-02-16T17:04:31.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-19T08:44:22.000Z (almost 6 years ago)
- Last Synced: 2024-10-30T00:38:23.281Z (2 months ago)
- Topics: country-flags, country-names, javascript, jquery, location, tracking
- Language: HTML
- Size: 35.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Get user’s country name and country flag based on his IP address
![](screenshots/location.png)
I have used 3 API to do this project:
1. [api.ipify](https://api.ipify.org/?format=json) to get user’s IP address.
2. [ipapi](https://ipapi.co/) to get the country code based on the IP address return by ipify.
3. [restcountries](https://restcountries.eu) to get country name and flag based on the code.See the [Demo](http://lioncoding.epizy.com/user-location/)