我想从具有IP地址的网站获取标头。
我曾经使用过,get_header()
但这仅适用于URL!还有其他方法吗?不使用gethostbyaddre
。
您有一个IP地址,例如: 127.0.0.1
您要使用get_headers()
(带有s)
...但是get_headers()
需要一个URL:
array get_headers ( string $url [, int $format = 0 ] )
您添加http://
并获得一个URL:—http://127.0.0.1
瞧!
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句