Ever seen that error? Yeah? Cause i've been sitting here for over 3 hours now trying to figure out why it's there. :(
The URL passed in is correct, and the iframe on the page does exist.
$doc = new DOMDocument();
@$doc->load($url);
$lst = $doc->getElementsByTagName('iframe');
$iframe = $lst->item(0);
$returnLinks[] = $iframe->attributes->getNamedItem('src')->value; // this line is causing the error!
Any ideas what's up? Here's the error once again:
Fatal error: Call to a member function getNamedItem() on a non-object in ....
If it matters, that codeblock is placed within a loop.