Source for file IPv6.php
Documentation is available at IPv6.php
* Validates an IPv6 address.
* @author Feyd @ forums.devnetwork.net (public domain)
* @note This function requires brackets to have been removed from address
public function validate($aIP, $config, $context) {
$blk =
'(?:' .
$hex .
'{1,4})';
$pre =
'(?:/(?:12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9]))'; // /0 - /128
if (strpos($aIP, '/') !==
false)
// IPv4-compatiblity check
$aIP .=
$ip[0] .
$ip[1] .
':' .
$ip[2] .
$ip[3];
list
($first, $second) =
$aIP;
// All the pieces should be 16-bit hex strings. Are they?
Documentation generated on Thu, 19 Jun 2008 18:49:39 -0400 by phpDocumentor 1.4.2