Answer the question
In order to leave comments, you need to log in
Find out the region code by IP?
The bottom line is that the site needs to display the phone for the corresponding region.
I came across ip2geolocation.com/ - as I understand it, it only accepts requests from the same domain. Plus, an incorrect region code is displayed (at Stavropol 26, on the site 70, or is there some kind of logic here?)
Then smart-ip.net/ the request comes here, everything is fine. Only the name of the city in Latin is displayed. And I will create a dictionary like ('Stavropol'='123321', 'Krasnodar'='5551111') and so on. But I don't know how they can write the name of each city (Moscow, Moscva or Moskva?).
In general, I need a service where I can find out the region's car code. Thank you.
Answer the question
In order to leave comments, you need to log in
For your needs, this recipe may be suitable:
1) There is such a wonderful file cidr_ru_block.txt available on Rosniiros, download the latest one.
2) With the required detail, you get the region (there are three levels Region, Oblast, City)
3) Upload to the database
4) Use from php or from scripts
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question