I have used 3 API to do this project:
- api.ipify to get user’s IP address.
- ipapi to get the country code based on the IP address return by ipify.
- restcountries to get country name and flag based on the code.
See the Demo
I have used 3 API to do this project:
See the Demo