hex - Convert hexadecimal string to numeric IP Address in PHP -


i want convert kind of address 0xc0a8071b numeric ip address (ex: 192.168.96.55)

how in php?

use old long2ip() here:

echo long2ip(0xc0a8071b); 

output:

192.168.7.27 

a nice feature parameter can passed numeric or string representation, can seen here: http://3v4l.org/p8trb

the function ip2long() can used convert other direction, ip number. however, both functions work ipv4 addresses only.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -