Forum Moderators: coopster

Message Too Old, No Replies

PHP Generating an XML feed

not displaying as XML

         

feralo

7:26 pm on Dec 14, 2005 (gmt 0)

10+ Year Member



i had arrived at the assumtion i could simply have a PHP file echo the (dynamically generated from a database)text of a properly formatted XML document- for an RSS feed. However, it doesn't seem to be working. it doesn't show up in my browser the way XML documents (RSS feeds) from other sites do when i browse to them.

Any suggestions?

dmorison

8:08 pm on Dec 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's normally just a case of...

header("Content-Type: text/xml")

...at the top of your script. Alternatively some people use:

header("Content-Type: application/xml");

After that it is, as you say, just a matter of splurting out correctly formatted XML and you should be in business.

feralo

8:22 pm on Dec 14, 2005 (gmt 0)

10+ Year Member



Right on dmorison,
Thank you for the help!