Concourse Office Plaza, 4709 Golf Road, Suite 809, Skokie, IL 60076
Call: (847) 675-2100

Contact Us

Newsletter

numPosts = 5; $config->targetFeed = "http://bestdentistnews.com/?feed=rss2"; $config->showTitle = true; $config->showLink = false; $config->showDate = true; $config->showContent = true; /* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx */ $newDoc = new DOMDocument(); $newDoc->load($config->targetFeed); $config->tags = $newDoc->getElementsByTagName("*"); foreach($config->tags as $thisTag) { if($thisTag->nodeName == "feed") { parseAtom($newDoc,$config); break; } elseif($thisTag->nodeName == "rss") { parseRSS($newDoc,$config); break; } } function parseRSS($doc,$settings) { $counter = 0; $fullList = $doc->getElementsByTagName("item"); foreach($fullList as $thisItem) { if ($counter >= $settings->numPosts) { break; } $values = $thisItem->getElementsByTagName("*"); $title = ""; $link = ""; $date = ""; $content = ""; foreach($values as $node) { if($node->nodeName == "title" && $settings->showTitle == true) {$title = $node->nodeValue;} if($node->nodeName == "link" && $settings->showLink == true) {$link = $node->nodeValue;} if($node->nodeName == "pubDate" && $settings->showDate == true) {$date = $node->nodeValue;} if($node->nodeName == "content:encoded" && $settings->showContent == true) {$content = $node->nodeValue;} } outputHTML($title,$link,$date,$content); $counter++; } } function parseAtom($doc,$settings) { $counter = 0; $fullList = $doc->getElementsByTagName("entry"); foreach($fullList as $thisItem) { if ($counter >= $settings->numPosts) { break; } $values = $thisItem->getElementsByTagName("*"); $title = ""; $link = ""; $date = ""; $content = ""; foreach($values as $node) { if($node->nodeName == "title" && $settings->showTitle == true) {$title = $node->nodeValue;} if($node->nodeName == "link" && $settings->showLink == true && $node->attributes->getNamedItem("rel")->nodeValue == "alternate") {$link = $node->attributes->getNamedItem("href")->nodeValue;} if($node->nodeName == "published" && $settings->showDate == true) {$date = $node->nodeValue;} if($node->nodeName == "content" && $settings->showContent == true) {$content = $node->nodeValue;} } outputHTML($title,$link,$date,$content); $counter++; } } function outputHTML($t,$l,$d,$c) { if ($t != "") { echo "

"; if ($l != "") { echo ""; } echo $t; if ($l != "") { echo ""; } echo "

"; } if ($d != "") { echo "

" . date('F jS Y',strtotime($d)) . "

"; } if ($c != "") { echo "

" . $c . "

"; } } ?>
4709 Golf Road, Suite 809, Skokie, IL 60076 USA
Mark J. Landau Dr. Mark Landau at Mark J. Landau, DDS in Skokie, IL offers Reconstructive, Cosmetic and General Dentistry services. (847) 675-2100