Skip to content

ipv4 地址转换,为何不使用inet_ntop() 函数 #13

@twomiao

Description

@twomiao

Socks5 源码:
for ($i = 0; $i < 4; $i++) { // var_dump(ord($tmp[$i])); $ip += ord($tmp[$i]) * pow(256, 3 - $i); } $request['dest_addr'] = long2ip($ip);

使用内置函数也可以解析:
inet_ntop()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions