$ip = getenv ("REMOTE_ADDR"); if (substr_count($ip,":") > 0 && substr_count($ip,".") == 0) { echo 'You are using .'href="http://www.dnsstuff.com/tools/whois.ch?ip=' . $ip . '"> IPv6 '; } else { echo "You are using IPv4"; } ?>
Via PHP snipplet for detecting users with IPv6
No comments »
Posted in linux
Tags: ipv4 ipv6 linux php script
You are currently browsing the archives for July, 2010.