Hướng dẫn lấy địa chỉ bằng GeoIP2 (ok)

http://maxmind.github.io/GeoIP2-php

Thư viện GeoLite2-City.mmdb có thể cập nhật mới trên trang https://dev.maxmind.com/geoip/geoip2/geolite2/arrow-up-right

Thư viện geoip2.phar có thể cập nhật mới trên trang

https://github.com/maxmind/GeoIP2-php/releasesarrow-up-right

Sau đây là ví dụ đã hoàn thành :)

Ví dụ 1: Dùng thư viện geoip2.phararrow-up-right

Link: https://github.com/maxmind/GeoIP2-php/releasesarrow-up-right

Link: https://www.codegrepper.com/code-examples/php/get+ip+location+phparrow-up-right

file-download
24MB

Ví dụ 2: Dùng luôn một ví dụ có sẵn :)

Link: https://github.com/maxmind/GeoIP2-php/releasesarrow-up-right

C:\xampp\htdocs\scss\test.php

Vì 2 file GeoIP2-City.mmdb, GeoIP2-Country.mmdb có dữ liêu lớn không cho phép tải ở đây vì vậy phải tải lên google drive :)))

https://drive.google.com/file/d/1YIErxG-i2B3n67xF3FzvBTrSKmC8WofZ/view?usp=sharingarrow-up-right

Full code có tại đây cho ví dụ này : https://drive.google.com/file/d/1rgVd2KnM7t4JorOC94Y7APKUaQGyRylv/view?usp=sharingarrow-up-right

file-archive
37KB

Last updated