HI every one
i've rss reader that using DOMDocument .I just have a problem , I want to get image url from a feed but I couldn't use it . This is my code a xml example of this feed :
$doc = new DOMDocument();
$doc->load('http://feeds.gawker.com/lifehacker/full');
$arrFeeds = array();
foreach ($doc->getElementsByTagName('item') as $node) {
print('<div style="width:100%" class="option"><strong>');
$a = $node->getElementsByTagName('title')->item(0)->nodeValue;
print("$a");
echo "<br /><br />";
$a = $node->getElementsByTagName('image')->item(0)->nodeValue;
print("$a");
}
This is a part of this feed :
<link>[url="http://lifehacker.com</link>"]http://lifehacker.com</link>[/url]
<description>Computers make us more productive. Yeah, right. Lifehacker recommends the software downloads and web sites that actually save time. Don't live to geek; geek to live.</description>
<language>en</language>
<pubDate>Tue, 16 Oct 2012 11:10:31 GMT</pubDate>
<lastBuildDate>Tue, 16 Oct 2012 11:10:31 GMT</lastBuildDate>
<ttl>2</ttl>
<image>
<title>Lifehacker</title>
<url>[url="http://ganja.gawkerassets.com/assets/base/img/thumbs140x140/lifehacker.com.png</url>"]http://ganja.gawkera...r.com.png</url>[/url]
<link>[url="http://lifehacker.com</link></image>"]http://lifehacker.co...</link></image>[/url]
How can I get the image url from it ?
Thanks