useCached(); $rss->title = "Elliniko-Argyroupoli RSS"; $rss->description = "News from Elliniko - Argyroupoli website"; $rss->link = "http://www.elliniko-argyroupoli.gr/rss"; $rss->syndicationURL = "http://www.elliniko-argyroupoli.gr/".$PHP_SELF; $image = new FeedImage(); $image->title = "Elliniko - Argyroupoli"; $image->url = "http://www.elliniko-argyroupoli.gr/images/rss.jpg"; $image->link = "http://www.elliniko-argyroupoli.gr"; $image->description = "Feed provided by elliniko-argyroupoli.gr. Click to visit."; $rss->image = $image; // get your news items from somewhere, e.g. your database: include '../conn.php'; $r=mysql_query("select a.*, b.catname FROM mynews a, cats b WHERE ((a.catid='1') or (a.catid='2') or (a.catid='3')) and b.catid=a.catid order by cmsid desc limit 0,20"); while ($m = mysql_fetch_array($r)) { $hh = substr($m["inpdate"],11,2); $mn = substr($m["inpdate"],14,2); $ss = substr($m["inpdate"],17,2); $dd = substr($m["inpdate"],8,2); $mm = substr($m["inpdate"],5,2); $yy = substr($m["inpdate"],0,4); $item = new FeedItem(); $item->title = $m["mytitle"] . " (" . $m["catname"] . ")"; $item->link = "http://www.elliniko-argyroupoli.gr/article.php?id=" . $m["cmsid"]; $item->description = $m["myshdescr"]; $item->date = mktime($hh, $mn, $ss, $mm, $dd, $yy); $item->source = "http://www.elliniko-argyroupoli.gr"; $item->author = "Elliniko - Argyroupoli"; $rss->addItem($item); } $rss->saveFeed("RSS1.0", "feed.xml"); ?>