Recently there is a Web site project requirements: the need to block domestic requests. Take the time to study the information in this area. The best way to find it now is to use the Nginx GeoIP module to realize the region's identification. Then
GeoIP Introduction:What is GEPIP?
The so-called GeoIP, is through the visitor's IP, positioning his latitude and longitude, country, provinces and cities, and even the location of the street information. The technology is not a problem, the key is
GeoIP Introduction:What is GEPIP?
The so-called GeoIP, is through the visitor's IP, positioning his latitude and longitude, country/region, provinces and cities, and even streets and other location information. The technology is not a problem, the
GeoIP Introduction:What is GEPIP?
The so-called GeoIP, is through the visitor's IP, positioning his latitude and longitude, country/region, provinces and cities, and even streets and other location information. The technology is not a problem, the
Transferred from: http://www.21andy.com/blog/20100405/1799.html
There are 2 standard methods of using GeoIP
The first method:Download the GeoIP data file first
Wget-c
GeoIP + PHP Usage
Method One:
Download GeoIP PHP file Geoip.inc, save as Geoip.inc.php
Http://sjolzy.cn/php/GeoIP/bak/geoip.inc
PHP uses code
Note: If you test locally because $_server[' remote_addr ' and $_server[' REMOTE_ADDR '] may be 127.0
To use GeoIP, you need to recompile nginx, my system is centos6.5,nginx with Tengine, the required package:GCC, gcc-c++, OpenSSL, Openssl-devel, GeoIP Library, GeoLite Country, GeoLite City, Pcre, Tengine21. Download the required Packageswget http://
Awstats is a foreign open source of the website PV flow monitoring software, can obtain Apache or Nginx log information, the log useful information to integrate into the HTML page display, because the content of the analytic log is very meticulous,
After AWStats is installed by default, it does not have the country or region information to identify visitors. Therefore, you need to install the plug-in to support AWStats to list the countries and regions of visitors for analysis.
Geoip is a
GeoIP + PHP UsageMethod One:Download GeoIP PHP file Geoip.inc, save as Geoip.inc.phpHttp://sjolzy.cn/php/GeoIP/bak/geoip.incPHP uses codeNote: If you test locally because $_server[' remote_addr ' and $_server[' REMOTE_ADDR '] may be 127.0.0.1, the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.