• CentOS installs geoip support for Apache


    Install GeoIP yum install GeoIP GeoIP-devel GeoIP-data zlib-devel Download the latest IP data mkdir /usr/local/share/GeoIP cd /usr/local/share/GeoIP wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz gunzip GeoIP.dat.gz gunzip GeoLiteCity.dat.gz Install mod? Geoip yum install mod_geoip Modify Apache configuration <IfModule mod_geoip.c> GeoIPEnable On GeoIPDBFile /usr/local/share/GeoIP/GeoIP.dat Standard GeoIPDBFile /usr/local/share/GeoIP/GeoLiteCity.dat Standard </IfModule> 5. check phpinfo();

  • Implementation of a distance tracker using HTML5 Geolocation


    HTML5 Geolocation is used to locate the user’s location. So how to implement a distance tracker? My idea is this, if the browser supports H5 geolocation, on this basis, to get the user’s location, update the user’s location, calculate the distance, display to the page, so that a simple distance tracker is realized. In order […]