How to track users location / region in PHP

前端 未结 6 1641
野趣味
野趣味 2020-12-10 19:44

I\'m trying to get the country from which the user is browsing the website so I can work out what currency to show on the website. I have tried using the GET scripts availab

6条回答
  •  有刺的猬
    2020-12-10 20:04

    You should use the geoip library.

    Maxmind provides free databases and commercial databases, with a difference in the date of last update and precision, the commercial being of better quality.

    See http://www.maxmind.com/app/geolitecountry for the free database.

    I think it should be sufficient for basic needs.

提交回复
热议问题