更新时间:2023-12-02 15:44:04
Use an IP geolocation database (some are free) and $_SERVER["REMOTE_ADDR"] to get the visitor's IP address.
http://www.maxmind.com/app/geolitecity is a free (less accurate) version of a commercial one.
如何限制哪些国家可以查看我的网站(PHP)