php从mysql解码二进制(16)ip

i have ip's stored in mysql in binary(16) format

in phpmyadmin, it looks like this:

4c44b817

how can i convert it to readable ip string ?

Thanks !!

MySQL has INET_NTOA() function that converts numeric IPv4 address representations to the dotted-quad strings, e.g.:

mysql> SELECT INET_NTOA(0x4c44b817);
+-----------------------+
| INET_NTOA(0x4c44b817) |
+-----------------------+
| 76.68.184.23          |
+-----------------------+

There's also INET_ATON() that works the other way around, as well as INET6_* versions of both functions that work with IPv6 addresses.