useCached(); $rss->title = "LlamaLAN news"; $rss->description = "Current news from the LlamaLAN website"; $rss->link = "http://www.llamalan.co.uk/news"; $rss->syndicationURL = "http://www.llamalan.co.uk".$PHP_SELF; $NewsInfo = GetData(array($Tables['Articles'],array($Tables['Users'],"INFO_USERID","user_id"),array($Tables['Article_Info'],"INFOID","info_link_ChildID")),array("INFOID","INFOTITLE","INFODATA","INFODATE",$Tables['Users'].".username"),array($Tables['Article_Info'].".info_link_ParentID"),array("203"),array("="),"INFODATE desc"); $MaxNewsCount = 5; for($intCounter=0;$intCounter<$MaxNewsCount;$intCounter++) { $item = new FeedItem(); $item->title = $NewsInfo[$intCounter]['INFOTITLE']; $item->link = "http://www.llamalan.co.uk/index.php?ArticleID=".$NewsInfo[$intCounter]['INFOID']; $item->description = substr(htmlspecialchars(htmlentities(AddTagstoArticle($NewsInfo[$intCounter]['INFODATA'],$Tables))),0,200)."...."; $item->date = strtotime($NewsInfo[$intCounter]['INFODATE']); $item->source = "http://www.llamalan.co.uk/news"; $item->author = $NewsInfo[$intCounter]['username']; $rss->addItem($item); } $rss->saveFeed("RSS1.0", "/home/sites/llamalan.co.uk/public_html/rss/feeds/news.xml"); ?>