MONDAY, FEBRUARY 06, 2012
Header

Category: ipv6

PHP4 IPv6 validation

Incase you don’t have the luxury of PHP5′s filter_ functions, this is a handy regexp:
function validate_ipv6($ip) { $hex = ‘[A-Fa-f0-9]‘; $h16 = “{$hex}{1,4}”; $dec_octet = ‘(?:25[0-5]|2[0-4]d|1dd|[1-9]d|[0-9])’; $ipv4 = “$dec_octet.$dec_octet.$dec_octet.$dec_octet”; $ls32 = “(?:$h16:$h16|$ipv4)”; $ipv6 = “(?:(?:{$IPv4address})|(?:”. “(?:$h16:){6}$ls32″ . “|::(?:$h16:){5}$ls32″ . “|(?:$h16)?::(?:$h16:){4}$ls32″ . “|(?:(?:$h16:){0,1}$h16)?::(?:$h16:){3}$ls32″ . “|(?:(?:$h16:){0,2}$h16)?::(?:$h16:){2}$ls32″ . “|(?:(?:$h16:){0,3}$h16)?::(?:$h16:){1}$ls32″ . “|(?:(?:$h16:){0,4}$h16)?::$ls32″ . “|(?:(?:$h16:){0,5}$h16)?::$h16″ . “|(?:(?:$h16:){0,6}$h16)?::” . “)(?:/(?:12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9]))?)”; $regex = “/^$ipv6$/”; return preg_match($regex, $ip); }

rtsol under Leopard

Leopard’s rtsol clients seems broken. Thanks to Wiedi, I managed to create this patch:

Read more ...

Visitors map

Contact Info


Popup Widget

This is the Popup Widget. Add any widget to the popup widget position, and place anywhere Gantry Popup widget to trigger the RokBox.

You can configure its height and width from the widget settings.

More Information