Procedure for using an IP Geolocation Database
To learn more about a particular consumer, you can obtain their IP address from your network logs. After that, you’ll need to get the most recent version of something like an IP geolocation database online. Find the IP address of the user in the database by opening it in a spreadsheet application. By receiving this information, you may be able to customize the content he or she sees every time he or she visits your website according to his or her country.
More Info: https://db-ip.com/db/