Trouble w/ rss feed media type


#1

Hi,

I’m using php to create an rss feed. Everything works fine, and the feed validates, but w/ a warning.

Feeds should not be served with the “text/html” media type

This seems to be happening because php outputs in “text/html”… how can you change this?

I’d like to output “application/rss+xml”


#2

In the top of your file, use the following:

header(‘Content-type: application/rss+xml’);