I am trying to get the title and meta description data of page by providing it url of target page but file_get_html() always return FALSE value. Any suggestions? by the way I have enabled the php extension php_openssl.
<?php
include("inc/simple_html_dom.inc.php");
$contents = file_get_html("https://www.facebook.com");
if($contents !=FALSE) //always skips if condition
{
foreach($contents->find('title') as $element)
{
$title = $element->plaintext;
}
foreach($contents->find('meta[description]') as $element)
{
$meta_description = $element->plaintext;
}
$output = array('title'=>$title, 'meta'=> $meta_description);
echo json_encode($output);
}
else
{
echo"Couldn't load contents";
}
?>
UPDATE:
So file_get_html() works fine now but any idea about dealing with facebook update browser message?
This displays: