获取带IP的网站标题

Okt*_*tay 2 php

我想从具有IP地址的网站获取标题.

我用过,get_header()但这只适用于URL!还有其他方法吗?不使用gethostbyaddre.

Gui*_*iks 5

你实际上可以使用IP.由于没有代码,我无法分辨你哪里出错了.但我可以告诉它应该怎么做:

$url = 'http://173.194.65.101/';
$headers = get_headers($url);
print_r($headers);
Run Code Online (Sandbox Code Playgroud)