I posted this thread in xml and rss and got no replies so i'm trying here .... Please Help. I have created a php page that outputs an rss feed as it should look in an xml file. What I need to know now is how to make it readable as a feed? What I have now can be viewed at: http://www.mofikiworldwide.com/rssfeed2.php Any help would be appriciated and thank you all in advance.
try this at the top of php page header ("content-type: text/xml"); But it seems you are using htmlentities() or htmlspecialchars type of function otherwise why would < get converted to <??
Ok I will post the code and the result so that everyone can see where the result is comming from. Code: <?php header("content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?><br />"; echo "<rss version=\"2.0\"><br /><br />"; echo "<channel><br />"; echo "<title>Mofiki WorldWide RSS Feed</title><br />"; echo "<link>http://www.mofikiworldwide.com</link><br />"; echo "<description>Articles about Mofiki WorldWide, Website design, development, Search Engine Optimization, and Hosting. This Feed will also have tutorials about said categories.</description><br /><br />"; // What its about include('connect.php'); $q = mysql_query("SELECT * FROM blog ORDER BY id DESC LIMIT 5") or die(mysql_error()); while($r = mysql_fetch_assoc($q)) { echo "<item><br />"; echo "<title>".$r['title']."</title><br />"; echo "<link>http://www.mofikiworldwide.com/viewblog.php?blogid=".$r['id']."</link><br />"; echo "<description>".$r['message']."</description><br />"; echo "<author>Brandon Orndorff</author><br />"; echo "<pubDate>".$r['date']."</pubDate><br />"; echo "</item><br /><br />"; } echo "</channel><br />"; echo "</rss><br />"; ?> Code (markup): And the result can be seen at: http://www.mofikiworldwide.com/rssfeed2.php It seems to display ok but it needs to actually be read as an xml file and I have no idea how to do this. I have faith this community will have te answer Thank you in advance.
Ok it seems to work I just can't pull in the description as the entire article seemed to be my second issue. Thank you for your help