Hello guys I am working on the rss tutorial. I did get it to work but I am having a problem. I am getting this error Warning: Cannot add header information - headers already sent by (output started at /var/www/html/news_rss/Test2.php:8) in /www/news_rss/Test2.php on line 56. Can any one tell me what this means. Below is the code Thanks for your help.. <?php include "config.php"; $link = mysql_connect($config['db_host'],$config['db_user'],$config['db_pass']) or die(); mysql_select_db($config['db_name']) or die(); $news_headlines = mysql_query("SELECT n.*,a.* FROM news AS n LEFT JOIN authors AS a ON a.aid=n.n_author_id ORDER BY n.n_time DESC".(is_numeric($config['headlines']) && $config['headlines']>0 ? " LIMIT {$config['headlines']}" : null)); $items_output = null; if(mysql_num_rows($news_headlines)) { while($headline = mysql_fetch_assoc($news_headlines)) { $link = htmlentities("http://example.com/index.php?act=news&id={$headline['nid']}"); $pubdate = gmdate('r',$headline['n_time']); $author = $config['show_author_info'] ? "nttt<author>{$headline['a_email']} ({$headline['a_name']})</author>" : null; $description = nl2br($headline['n_body']); $items_output .= <<<EOF <item> <title>{$headline['n_title']}</title> <description> {$description} </description> <link>{$link}</link> <pubDate>{$pubdate}</pubDate>{$author} </item> EOF; } } $config['encoding'] = empty($config['encoding']) ? 'ISO-8859-1' : $config['encoding']; $copyright = empty($config['copyright']) ? null : "ntt<copyright>".str_replace('{year}',date('Y'),$config['copyright'])."</copyright>"; $pubdate = $config['show_feed_pubdate'] ? "ntt<pubDate>".gmdate('r')."</pubDate>" : null; $language = empty($config['language']) ? null : "ntt<language>{$config['language']}</language>"; $output = <<<EOF <?xml version="1.0" encoding="{$config['encoding']}" ?> <rss version="2.0"> <channel> <title>{$config['feed_title']}</title> <link>{$config['link']}</link> <description>{$config['description']}</description>{$copyright}{$pubdate}{$language}{$items_output} </channel> </rss> EOF; header("Content-type: application/xml; charset={$config['encoding']}"); echo $output; ?>