The question of Pure IP countries is that there are several languages for websites. IP addresses are used to determine which country the website belongs to and which language the website will access.
A pure IP database is created. if the IP address is an IP address in China, only the province and city are displayed and the country name is not displayed.
How can this problem be solved,
Or there is no better IP library or method to determine which language to enter the page.
Reply to discussion (solution)
You can divide it into countries, provinces, and cities. if the country is not found, it is China by default, and you can find provinces and cities in China.
Compare the display first with China. if it does not match, the default value is China.
How many provinces are there?
There is another problem,
Some IP addresses are unknown physical addresses. can this IP address appear when others access it?
And
Reserved address
And
Unknown
Unknown physical address indicates that the data producer has not yet determined the source address. you can ask your user and contribute the address.
The reserved address indicates that this is an internal address (used within the LAN or WAN) and will not appear on the Internet.