PHP installation of GeoIP extension based on the IP address to obtain the geographic location and calculation distance method, geoip geographic location
Obtain the visitor's country, city, and latitude and longitude Based on the IP addressInstall GeoIP extension:
sudo apt-get install libgeoip-dev
pecl install geoip-1.1
Recently installed Nginx Geo module in the compilation of Nginx encountered an error, error information as follows:Checking for OpenSSL Library ... foundchecking for zlib library ... foundchecking for GeoIP library ... not foundchecking For GeoIP library in/usr/local/... not foundchecking for GeoIP library in/usr/pkg/... not foundchecking for
Use GeoIP and PHP to build a simple MySQL geographic database. MaxMind GeoIP is a very useful tool used to identify the country where your Web site visitors are located. But once you have the geographic information, what should you do? This type of data MaxMind GeoIP is a very useful tool used to identify the country where your Web site visitors are located. But
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 configure the relevant country's ISO name and prohibit access. Record the relevant process.
Compiling GEOIP components
Maxmind provides a free version of the dat
GeoIP introduction:What is GepIP?
GeoIP is used to locate the geographical longitude and latitude of a visitor, country/region, province/city, or even Street. The technology here is not difficult. The key is to have a precise database. With accurate data sources, you can earn a small amount of money for odd goods. However, it is our pursuit to promote the spirit of cooperation and make a collective contribu
This article mainly introduces the use of GeoIP Library instances in php. This article provides code instances subdivided into countries and cities, for more information, see maxmind, which is the provider of the geoip database,
Sample and api instructions in many languages are also provided.
For example, php and php's geoip library are quite different, including
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 key is to have a precise database. With accurate data sources on the enjoy high earn a little money, but to carry forward the spirit of cooperation, collective co
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 key is to have a precise database. With accurate data sources on the enjoy high earn a little money, but to carry forward the spirit of cooperation, collective co
MaxMind GeoIP is a very useful tool used to identify the country where your Web site visitors are located. But once you have the geographic information, what should you do? A common application of such data is the advertisement for geographic location. The basic steps for using GeoIP data are quite simple-you read the visitor's remote IP address (using GeoIP ing
GeoIP PHP extension installation and configuration, geoipphp Extension Configuration
Author: zhanhailiang Date:
1. Install GeoIP-devel and GeoIP Dependencies
GeoIP-devel.x86_64 : Development headers and libraries for GeoIPGeoIP.x86_64 : Library for country/city/organization to IP address or hostname mapping
yum install
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 to have a precise database. With accurate data sources on the enjoy high earn a little money, but to develop a spirit of cooperation, collective contribution to t
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 http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gzGunzip GeoIP.dat.gz
Then download GeoIP PHP file, save
This article mainly introduces the use of GeoIP Library instances in php. This article provides code instances subdivided into countries and cities, for more information, see maxmind, which is the provider of the geoip database,
Sample and api instructions in many languages are also provided.
For example, php and php's geoip library are quite different, including
How to Use DNS + geoip + nginx + varnish as a world-class CDN
How to use bind, geoip, nginx, and varnish to create your own efficient CDN network?CDN stands for content distrubtion Network, which is a content delivery network. In short, it refers to Server Load balancer in all regions. The concept of a whole region can be national or global. The unified DNS server performs address forwarding and selects the
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.0.1, the output content is empty. Can bring in the IP test yourself
Method Two:
Installing
Configure GeoIP in logstash to parse geographic information, logstashgeoip
The GeoIP database configured in logstash parses the ip address. Here, an open source ip data source is used to analyze the ip address of the client. The official website is here: MAXMIND
DownloadGeoLiteCityDatabase
Wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.t
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://tengine.taobao.org/download/tengine-2.0.3. Tar.gzwget http://geolite.maxmind.com/download/ geoip/database/GeoLiteCi
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.