See http://code.google.com/p/ipaddr-py/
With this, we can do
py> p=ipaddr.IPv6("2001:888:2000:d::a2")
py> p.SetPrefix(64)
py> p
IPv6('2001:888:2000:d::a2/64')
py> p.network_ext
'2001:888:2000:d::'
python | KutuKupret
See http://code.google.com/p/ipaddr-py/
With this, we can do
py> p=ipaddr.IPv6("2001:888:2000:d::a2")
py> p.SetPrefix(64)
py> p
IPv6('2001:888:2000:d::a2/64')
py> p.network_ext
'2001:888:2000:d::'
There are many ways, scripting/language to obtain remote IP address of the user who is browsing our website.
#!/usr/bin/perl use CGI; print "Content-type: text/plain; charset=iso-8859-1\n\n"; my $q = new CGI; print "<b>Your Remote IP Address :" . $q->remote_host() . "</b>";
<?php echo "<b>Your Remote IP Address :" . $_SERVER['REMOTE_ADDR'] . "</b>"; ?>