Tags Archives: php

PHP IPv4 and IPv6 Network and Subnet Calculator

Just threw together a quick and dirty PHP-based subnet calculator. What sets this one apart from others is that it works with both IPv4 and IPv6 inputs and has subnet splitting capability. Use the first field to enter a network to get details about. The format is CIDR notation ‘’. Use the second field to […]

Cpanel: Install mod_geoip for PHP

First, install the Maxmind GeoIP database. mkdir /usr/local/share/GeoIP cd /usr/local/share/GeoIP wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz gzip -d GeoIP.dat.gz wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz gzip -d GeoLiteCity.dat.gz wget http://twiki.cpanel.net/twiki/pub/EasyApache3/CustomMods/custom_opt_mod-mod_geoip.tar.gz tar -C /var/cpanel/easy/apache/custom_opt_mods -xzf custom_opt_mod-mod_geoip.tar.gz Then, recompile Apache and PHP. /scripts/easyapache