GetMemoriaToRss(LIMIT_RSS); $rss_channel = new rssGenerator_channel(); $rss_channel->title = 'Empresário Online'; $rss_channel->link = $URLROOT.'/memoria/index.php'; $rss_channel->description = $descricao; $rss_channel->language = 'pt-br'; $rss_channel->generator = 'PHP RSS Feed Generator'; $rss_channel->managingEditor = 'editor@mysite.com'; $rss_channel->webMaster = 'webmaster@mysite.com'; foreach($arrMemoria as $memoriaRss){ $item = new rssGenerator_item(); $myConteudo = $myConteudoData->GetConteudoById($memoriaRss->emp_conteudo_id); $item->title = $myConteudo->titulo; $memoriaRss = strip_tags(stripslashes($memoriaRss->texto_chamada),null); $palavras = explode(" ",$memoriaRss); for($i = 0;$i < 20;$i++){ $texto .= $palavras[$i]." "; } $texto = substr($texto,0,strrpos($texto,' '))."..."; $item->link = $URLROOT.'/memoria/sala.php?edicao='.$memoriaRss->edicao; $item->pubDate = $memoriaRss->pdate; $rss_channel->items[] = $item; } $rss_feed = new rssGenerator_rss(); $rss_feed->encoding = 'UTF-8'; $rss_feed->version = '2.0'; header('Content-Type: text/xml'); echo $rss_feed->createFeed($rss_channel); ?>