我需要将ipv6地址转换为其半字节格式,以便动态创建ptr记录.以下是我从维基百科获得的信息:
原文链接:https://www.f2er.com/php/135815.htmlIPv6 reverse resolution
Reverse DNS lookups for IPv6 addresses
use the special domain ip6.arpa. An
IPv6 address appears as a name in this
domain as a sequence of nibbles in
reverse order,represented as
hexadecimal digits as subdomains. For
example,the pointer domain name
corresponding to the IPv6 address
2001:db8::567:89ab is
b.a.9.8.7.6.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.
关于半字节我唯一能找到的就是在包函数中,http://www.php.net/pack.我找不到任何解决方案,其中包含来自谷歌搜索问题的例子.
任何帮助是极大的赞赏.