useCached(); $rss->title = "Goofts - Funny gifts, gags and pranks."; $rss->description = "The best funny gift ideas from Goofts.com - Shop for cool unique stuff, office fun, funny gifts, humorous collectibles, big boys toys, gadgets and gizmos."; $rss->descriptionHtmlSyndicated = true; $rss->link = "http://www.goofts.com/feed"; $rss->syndicationURL = "http://www.goofts.com/".$PHP_SELF; $query = "SELECT * FROM goofts WHERE visible=1 ORDER BY order_id DESC LIMIT 100"; $stmt = $con->prepare( $query ); $stmt->execute(); while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $item = new FeedItem(); $item->descriptionHtmlSyndicated = true; $item->title = $row['title']; $item->link = "http://www.goofts.com/".$row['id'].".html"; $item->source = "http://www.goofts.com"; $item->guid = "http://www.goofts.com/".$row['id'].".html"; $rss->addItem($item); } $rss->saveFeed("RSS2.0", "news/feed.xml"); ?>