I am using Simple HTML Dom to scrape keywords off remote web pages but I can't figure out quite how to achieve this.
I am currently using the following code.
$html = str_get_html($remote_html);
echo $html->find("meta[keywords]")->content;
And receiving the following error:
Trying to get property of non-object
find() returns not an object but an array containing (in this case) 1 object. Also 'keywords' is not an attribute, but 'name' is. Use:
$oHTML = str_get_html( $remote_html );
$arElements = $oHTML->find( "meta[name=keywords]" );
echo $arElements[0]->content;