setTitle('TCAA'); $TestFeed->setLink('http://tcaa.acosoc.org'); $TestFeed->setDescription('Technical Committee on Architectural Acoustics'); //It's important for RSS 1.0 $TestFeed->setChannelAbout('http://tcaa.acosoc.org/about.php'); //Adding a feed. Genarally this protion will be in a loop and add all feeds. $n=1; include("dbconnect.php"); //Connect to database $result = mysql_query("Select * From home_notif Order By date_2 Desc"); while(($rows = mysql_fetch_array($result))&&($n<8)) { //Create an empty FeedItem $newItem = $TestFeed->createNewItem(); //Add elements to the feed item //Use wrapper functions to add common feed elements $newItem->setTitle($rows["title"]); $newItem->setLink($rows["url"]); //The parameter is a timestamp for setDate() function $newItem->setDate($rows["date_rss"]); $newItem->setDescription($rows["descr"]); //Use core addElement() function for other supported optional elements $newItem->addElement('dc:creator', $rows["author"]); //Now add the feed item $TestFeed->addItem($newItem); $n++; } mysql_close($con); //OK. Everything is done. Now genarate the feed. $TestFeed->genarateFeed(); ?>