I've tried stripos, and regex...I found a beautiful article on why regex doesn't work with html but basically it's as the title says... I have an external site with a div that looks like this:
<div id="overlay" style="height: 3058px; display: block;"></div>
External site is being called like so:
$results = file_get_contents($url);
I tried using stripos for overlay but since there's multiple instances of overlay on the site, it's always returning true even when the div isn't there. I tried searching by "overlay" instead of just overlay but that didn't work either, nor did searching for
"overlay"
I did the same thing with preg_match
echo "Results:".preg_match('/overlay/', $results). ":End result.";
echo "Results:".preg_match('/"overlay"/', $results). ":End result.";
echo "Results:".preg_match('/"overlay"/', $results). ":End result.";
but I got the same issue