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();
$doc->load('http://tripleax.com/john/?feed=rss2');
$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");
    print('</strong><br /><span class="option">');
    $a = $node->getElementsByTagName('description')->item(0)->nodeValue;
    print("$a");`
}

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?

Thanks!

You'll need getElementsByTagNameNS()

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