ip - How show IPv4 only with REMOTE_ADDR in PHP? -
i have question variable : $_server['remote_addr']
. wish recovers ip addresses in ipv4 format . extracted me few times in ipv6 format .
how do?
$_server['remote_addr']
contains address of visitor. if contains ipv6 address visitor used ipv6 , there no ipv4 address. , vice versa of course. these days have able deal both.
some visitors have ipv4, have ipv6 , have both. browser decides available , use, , that's you'll see. note browser has both might switch between ipv4 , ipv6 between requests if deems necessary connectivity.
Comments
Post a Comment