useCached(); $rss->title = "Threads for Export"; $rss->description = "Alternative Media News Portal"; $rss->link = "http://altport.org/activism/"; $rss->syndicationURL = "http://altport.org".$PHP_SELF; $image = new FeedImage(); $image->title = "Altport"; $image->url = "http://altport.org/search/links/img/activism.gif"; $image->link = "http://altport.org/activism/"; $image->description = "Feed provided by altport.org"; $rss->image = $image; $dbhost = "localhost"; $dbuser = "root"; $dbpass = ""; $dbase = "activism"; $tbl = "Links"; // get your news items from somewhere, e.g. your database: $conn = mysql_connect($dbhost,$dbuser,$dbpass); mysql_select_db($dbase,$conn); //mysql_select_db($dbHost, $dbUser, $dbPass); $res = mysql_query("SELECT * FROM Links ORDER BY date DESC"); $cnt = 0; while ($data = mysql_fetch_object($res)) { if($cnt<20) $cnt++; else break; $item = new FeedItem(); $item->title = $data->title; $item->link = $data->url; if(strlen($data->imgurl)>3){ $img=""; } $item->description = $img." ".$data->descr; #$item->pubDate = $data->date; $item->date = $data->date; $item->source = "http://altport.org/"; $item->author = "Altport.org noisefactorDELETE@THISnetscape.net"; $rss->addItem($item); $img = ""; } $rss->saveFeed("ATOM0.3", "activismAtomFeed.xml"); ?>