K
K
krasulya2011-08-31 01:45:32
Computer networks
krasulya, 2011-08-31 01:45:32

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

3 answer(s)
V
Vladislav Ross, 2011-08-31
@gag_fenix

ipgeobase.ru
Perhaps there is a region code in KLADR?

L
lesha_penguin, 2011-08-31
@lesha_penguin

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

Z
Zhenka961, 2019-01-18
@Zhenka961

Hello, I don’t know about IP, but I can advise a good site where you can find the Automotive Stake of Russian Regions https://autorealm.ru/kody-regionov-rossii/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question