Thread: IpV6 mod
View Single Post
  #3  
Old 2nd July 2022, 09:18
Elena Elena is offline
Senior Member
 
Join Date: Sep 2010
P2P
Posts: 111
Default
Code:
function ipv6_numeric($ip){$binNum = '';foreach (unpack('C*', inet_pton($ip)) as $byte){$binNum .= str_pad(decbin($byte), 8, "0", STR_PAD_LEFT);}
return base_convert(ltrim($binNum, '0'), 2, 10);}
Reply With Quote
The Following User Says Thank You to Elena For This Useful Post:
szaby (2nd July 2022)