PHP IPv4 and IPv6 calculator

Special thanks to krischan at jodies.cx for ipcalc.pl http://jodies.de/ipcalc The presentation and concept was mostly taken from ipcalc.pl and adapted for PHP and IPv6 function.