I am use the code to display our rss feed from our blog from this url http://msplweb.wordpress.com/feed/
but i see the partially content of the blog description ,
how i get the full description of the blog.
code is here:-
<?php
// read_rss(display_n_items,feed_url)
function read_rss($display=5,$url='') {
$doc = new DOMDocument();
$doc->load($url);
$itemArr = array();
foreach ($doc->getElementsByTagName('item') as $node) {
//print_r($node);
if ($display == 0) {
break;
}
$itemRSS = array (
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
'description' => $node->getElementsByTagName('description')->item(0)->nodeValue,
'link' => $node->getElementsByTagName('link')->item(0)->nodeValue,
//'author' => $node->getElementsByTagName('author')->nodeValue,
'pubdate' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue
);
array_push($itemArr, $itemRSS);
$display--;
}
return $itemArr;
}
?>
-
<?php
$items = read_rss(5,'http://msplweb.wordpress.com/feed/atom/');
foreach ( $items as $item ) {
//echo '' . $item['title'] .'
'.$item['description']. '';
echo '<b>' . ucwords($item['title']). '</b>' .'
'.$item['description'].'
'.$item['author'].$item['pubdate'].'
';
}
?>
The blog I need help with is msplweb.wordpress.com.