Jump to content


outputting valid rss in php

  • Please log in to reply
1 reply to this topic

#1 bullchina

  • Members
  • PipPip
  • Member
  • 19 posts
  • LocationHouston

Posted 06 September 2006 - 02:40 PM

I have a database with news entries in it in mysql, i'm grabbing the data, and then trying to output that data as a valid rss feed, but the feed just shows up as text in the browser. i must be missing something, but when i view the source code, it looks identical to every other rss feed i've ever seen. the code to generate the rss is in a smarty tpl file":

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" 
    <title>Roldan + Berengue, arqts.</title>
    <description>News from the office of Miguel Roldan and Merce Berengue</description>
		<title>Roldan + Berengue, arqts.</title>
	{foreach from=$news item=item key=key}
	  {if $item.enclosure != ""}
	  <enclosure url="{$item.enclosure}" length="{$item.bytes}" type="{$item.type}" />

but it shows up like this: http://dave.showviz....rbweb/news/rss/

no clue what's wrong, but i know it's something simple. thanks for your help,

#2 bullchina

  • Members
  • PipPip
  • Member
  • 19 posts
  • LocationHouston

Posted 07 September 2006 - 10:26 AM

i figured it out from a tutorial on kirupa.com ... i wasn't giving a content-type header in the php code. hope this might help someone else some day also: kirupa.com/web/mysql_xml_php.htm

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users