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
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
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
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 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
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
Believe that have done awstats have used the open source Geoip.dat IP database, just nginx wiki on the GeoIP module, so that can achieve a regional load balance, but the Maxmind of IP database for China's support is not too good, but now is not bad ~
Here are a brief outline of the steps needed to install GeoIP Legacy City on Linux/unix. The installation on Windows are similar, just replace the tar command with WINZIP or a similar ZIP program.Step 1–download DatabaseFor GeoIP clients, go to the
If your m website is for English customers and you may not want to accept access from Chinese IP segments, you can use Apache's geoip module to easily achieve this.
Http://www.maxmind.com/app/mod_geoip
For reference only!
I. Briefly
I believe that awstats has used open source geoip. the dat ip database is just nginx wiki with the geoip module, which can achieve regional load balancing. However, maxmind's ip database does not support China very well, but it is also good now
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.