channel->item as $item) { if ($now - 5 * 24 * 60 * 60 < strtotime($item->pubDate)) $announcements[] = $item; } // get recent posts (plus announcements) $posts = new SimpleXMLElement(file_get_contents("http://cs75.net/phorum/feed.php?0,type=rss")); // begin XHTML $xhtml = '
'; // output current announcements if (count($announcements) > 0) { // header for announcements $xhtml .= 'Announcements'; $xhtml .= '

'; // start list $xhtml .= ''; // horizontal rule $xhtml .= '
'; } // header for recent messages $xhtml .= 'Recent Messages in the Forum'; $xhtml .= '

'; // start list $xhtml .= ''; // end XHTML $xhtml .= '
'; // cache XHTML course()->cache("posts", $xhtml); // output XML header("Content-type: text/xml"); print(''); print(''); ?>