useCached(); $rss->title = "$setting[site_url]"; $rss->description = "$setting[site_title]"; $rss->link = "http://www.$setting[site_url]"; $rss->syndicationURL = "http://www.$setting[site_url]".$PHP_SELF; include("includes/c_t_d.php"); include("includes/functions.php"); // get your news items from somewhere, e.g. your database: if ($id==0){ $res = mysql_query("select * from news_news where accept='1' order by id desc limit 20"); }else{ $res = mysql_query("select * from news_news where accept='1' and cat='$id' order by id desc limit 20"); } while ($data = mysql_fetch_object($res)) { $link="http://www.$setting[site_url]/news.php?id=".$data->id; $item = new FeedItem(); $item->title = $data->subject; $item->link = $link; $item->description = $data->short_text; $rss->addItem($item); } $rss->saveFeed("RSS1.0", "rss$id.xml"); ?>