Answer the question
In order to leave comments, you need to log in
Why doesn't geoip work?
$ip = \Bitrix\Main\Service\GeoIp\Manager::getRealIp();
$geoIpData = \Bitrix\Main\Service\GeoIp\Manager::getDataResult($ip,'ru');
$cityName = \Bitrix\Main\Service\GeoIp\Manager::getCityName($ip,'ru');
Answer the question
In order to leave comments, you need to log in
I hasten to disappoint you, all IP-based geolocation is akin to astrology - the accuracy is the same.
You need to check which module you have active here: `/bitrix/admin/geoip_handlers_list.php`
Probably the modules are inactive, or the active module does not adhere to the interface, or you have exhausted the free limit and you need to enter a token.
Write, I can help with the integration of some open directory!
But, I repeat, only users of terrestrial providers can be detected by IP. The lion's share of clients comes from OpSoSov, and there IP does not mean anything.
Here is a simple library for implementing GeoIp in Bitrix, without limits and with a simple setup blog.ivru.net/?id=82
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question