Reputation: 576
So I'm trying to get the meta tags from a URL where I'd normally use get_meta_tags
but it no longer seems to work properly? I'm trying to get a description and image from them and my site is over HTTPS (if that's relevant). Am I using it incorrectly or is there now an alternative method to scrape this data in 2017, I've tried multiple ways with no luck so far and can't find anything in Google/SO suggesting I'm doing anything differently to anyone else.
$tags = get_meta_tags('https://facebook.com');
echo "<pre>";
print_r($tags);
Facebook Output
Array
(
[referrer] => default
[robots] => noodp,noydir
)
Youtube Output
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
)
Upvotes: 1
Views: 234