PHP 简单 HTML DOM 解析器浏览器不支持 (Facebook)
PHP Simple HTML DOM Parser Brower no support (Facebook)
我正在使用 PHP 简单 HTML DOM 解析器来获取 facebook 相册的内容,只是问题又回来了,我需要更新我的浏览器
我的代码
include('simple_html_dom.php');
$html = file_get_html("https://www.facebook.com/pg/natgeo/photos/?tab=album&album_id=431705768950");
echo $html;
Return这个
这样做吧!!
$url = "https://www.facebook.com/pg/natgeo/photos/?tab=album&album_id=431705768950";
$opts = array(
'http'=>array(
'header'=>"User-Agent:Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53\r\n"
)
);
$context = stream_context_create($opts);
$html = file_get_html($url , false, $context);
我正在使用 PHP 简单 HTML DOM 解析器来获取 facebook 相册的内容,只是问题又回来了,我需要更新我的浏览器
我的代码
include('simple_html_dom.php');
$html = file_get_html("https://www.facebook.com/pg/natgeo/photos/?tab=album&album_id=431705768950");
echo $html;
Return这个
这样做吧!!
$url = "https://www.facebook.com/pg/natgeo/photos/?tab=album&album_id=431705768950";
$opts = array(
'http'=>array(
'header'=>"User-Agent:Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53\r\n"
)
);
$context = stream_context_create($opts);
$html = file_get_html($url , false, $context);