useCached(); $rss->title = "fd Network News Feed"; $rss->description = "Alerts, Ouatges, News and Events from the fd Network"; $rss->link = "http://www.fdnetwork.com.au/news"; $rss->syndicationURL = "http://www.fdnetwork.com.au/rss.php"; $image = new FeedImage(); $image->title = "fd Network News Feed"; $image->url = "http://www.fdnetwork.com.au/common-images/logo.png"; $image->link = "http://www.fdnetwork.com.au/news"; $image->description = "Feed provided by fd Network. Click to visit."; $rss->image = $image; // get your news items from somewhere, e.g. your database: error_reporting(0); if ($con = mysql_connect("172.16.2.1", "fddbapp", "ln8egree")) { mysql_selectdb("fdnetwork-com-au", $con); //$query = "SELECT title, DATE_FORMAT(date,'%a, %e %b %y %H:%i:%S') as date, minidesc, link FROM NewsDisplay ORDER BY date DESC Limit 8;"; $query = "SELECT title, DATE_FORMAT(date,'%Y-%m-%dT%H:%i:%S+10:00') as date, minidesc, link FROM NewsDisplay ORDER BY date DESC Limit 8;"; //$query = "SELECT title, DATE_FORMAT(date,'%a, %e %b %y %H:%i:%S') as date, minidesc, link FROM NewsDisplay ORDER BY date DESC Limit 8;"; $newsresult = mysql_query($query); while ($news = mysql_fetch_array($newsresult)) { $item = new FeedItem(); $item->title = $news['title']; $item->link = "http://www.fdnetwork.com.au/".$news['link']; $item->guid = "http://www.fdnetwork.com.au/".$news['link']; $item->description = $news['minidesc']; $item->date = $news['date']; $item->source = "http://www.fdnetwork.com.au"; $item->author = "reception@fdnetwork.com.au (fd Network Reception)"; $rss->addItem($item); } } $rss->outputFeed("RSS2.0"); ?>