PHP get_meta_tags是否停止工作?

时间:2017-11-06 07:59:47

标签: php get-meta-tags

所以我试图从我通常使用get_meta_tags的网址获取元标记,但它似乎不再正常工作?我正在尝试从他们那里获取描述和图像,我的网站是通过HTTPS(如果这是相关的)。我错误地使用它还是现在有另一种方法可以在2017年获取这些数据,到目前为止我已经尝试了多种方法没有运气而且无法在Google / SO中找到任何建议我对其他任何人采取不同的做法。

$tags = get_meta_tags('https://facebook.com');
echo "<pre>";
print_r($tags);

Facebook输出

Array
(
    [referrer] => default
    [robots] => noodp,noydir
)

Youtube输出

Array
(
    [description] => Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
    [keywords] => video, sharing, camera phone, video phone, free, upload
    [theme-color] => #ff0000
)

0 个答案:

没有答案