//take the first post from the most recent thread to display as the 'current' event $current_rss_file = "http://www.swgemu.com/forums/external.php?type=RSS2&forumids=109&lastpost=0&nohtml=1&fulldesc=1&count=1"; $current_rss_feed = simplexml_load_file( $current_rss_file ); $rss_file = "http://www.swgemu.com/forums/external.php?type=RSS2&forumids=109&lastpost=0&nohtml=1&fulldesc=0&count=5"; $rss_feed = simplexml_load_file( $rss_file ); foreach( $current_rss_feed->channel->item as $item ) { $currentLink = $item->link; $currentTitle = $item->title; $currentBlurb = $item->description; $dc = $item->children('http://purl.org/dc/elements/1.1/'); $currentAuthor = $dc->creator; } //edit out "go to last post" in link $currentLink = str_replace("&goto=newpost", "", $currentLink); //TODO limit description character limit $newBlurb = substr($currentBlurb, 0, 400); //Find forum author userid and hence finds their avatar. if ($currentAuthor == "") { print "


