Newsletter
load($targetFeed);
$fullList = $newDoc->getElementsByTagName("item");
$counter = 0;
foreach($fullList as $thisItem) {
if ($counter >= $numFeeds) { break; }
$values = $thisItem->getElementsByTagName("*");
$title = "";
$link = "";
$date = "";
$content = "";
foreach($values as $node) {
if($node->nodeName == "title") {$title = $node->nodeValue;}
if($node->nodeName == "link") {$link = $node->nodeValue;}
if($node->nodeName == "pubDate") {$date = $node->nodeValue;}
if($node->nodeName == "content:encoded") {$content = $node->nodeValue;}
}
if ($title != "") {
echo "
";
}
if ($date != "") {
echo "
" . date('F jS Y',strtotime($date)) . "
";
}
if ($content != "") {
echo "
" . $content . "
";
}
$counter++;
}
?>