The external website I'm trying to get content from looks like this:
<div class="the_div_class">
<ul>
<li><a href="" style="background-color: rgb(252,187,69);">inferno</a></li>
<li><a href="" style="background-color: rgb(251,212,142);">heat</a></li>
</ul>
</div>
This is what I have so far though I only want to get li row content with the style: "background-color: rgb(252,187,69);". Can I add this somehow to the $query?
<?php
$doc = new DOMDocument;
$doc->preserveWhiteSpace = false;
$doc->strictErrorChecking = false;
$doc->recover = true;
$doc->loadHTMLFile('http://www.the_website.com');
$xpath = new DOMXPath($doc);
$query = "//div[@class='the_div_class']";
$entries = $xpath->query($query);
var_dump($entries->item(0)->textContent);
?>
Thanks a lot.