Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道检测用户访问的国家/地区的最佳软件包是什么?
我正在使用 php/mysql ..
您可以下载MaxMind GeoLite Country数据库,并使用它来查找用户的 IP 以确定他们的国家。
该数据库有付费版本,但我发现免费数据库的准确性绰绰有余。
我认为没有保证的方式,但有一些选择:
HTTP_ACCEPT_LANGUAGE
$_SERVER