Отключили от РСЯ

K4
На сайте с 29.01.2020
Offline
80
#591
TonyBlackberry #:

Это не ответ на вопрос) у меня тоже php-страница самописная. Как при помощи базы GeoLite2 запретить к ней доступ из Китая?)

Вот тут можно посмотреть пример на php с готовой библиотекой  -  https://dev.maxmind.com/geoip/geolocate-an-ip/databases/

Код свой могу скинуть, но он на asp.net core :)

Geolocate an IP address using Databases
  • dev.maxmind.com
Geolocating an IP address using GeoIP and GeoLite databases consists of configuring a database reader and querying the database. Implementation 1. Install the GeoIP client library We have a collection of officially supported libraries for you to query with the GeoIP and GeoLite databases: 2. Configure a GeoIP database reader to query the...

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий