I am looking to get content from an RSS2 feed in one of my sites and employ it in another site.

The feed is here. And also the code I am using is obtained from this nice site and it has been modified such as the following:

$doc = new DOMDocument();
$arrFeeds = array();
foreach ($doc->getElementsByTagName('item') as $node) {
    print('<div style="width:100%" class="option"><strong>');
    $a = $node->getElementsByTagName('title')->item(0)->nodeValue;
    print('</strong><br /><span class="option">');
    $a = $node->getElementsByTagName('description')->item(0)->nodeValue;

The issue I am getting is, I wish to display the whole post's contents. And also the description is really a kind of the teaser. Altering $node->getElementsByTagName('description')->item(0)->nodeValue to $node->getElementsByTagName('content')->item(0)->nodeValue provides me with nothing, and content:encoded isn't any better.

Can someone please point me within the right direction to fixing this?


You'll need getElementsByTagNameNS()

Silly you! Use $node->getElementsByTagName('encoded')->item(0)->nodeValue!