3
Contributors
2
Replies
11
Views
3 Years
Discussion Span
Last Post by JorgeM
0

An RSS feed is nothing more than an XML file. What exactly is the problem you're having? You can retrieve the data as usual, and then create a feed by applying a template.

0

Here is the basic structure of an RSS feed.

<?xml version='1.0' encoding='UTF-8'?> 
<rss version='2.0'> 
<channel> 

  <title>Website related title or RSS Feed Title </title> 
  <link>URL to your site</link> 
  <description>Description for your Site/Feed</description> 

  <item> 
    <title>Item Title</title> 
    <link>Item URL </link> 
    <description>Items description </description> 
  </item> 

</channel> 
</rss>

Then, create a php page...something like this...

<?php

// your db related code...

header("Content-type: text/xml"); 

echo "<?xml version='1.0' encoding='UTF-8'?> 
<rss version='2.0'>
<channel>
<title> *** </title>
<link>http://*****</link>
<description> ***** </description>";

while( // $row data from your db query)
{
$title=$row['title']; 
$link=$row['link']; 
$description=$row['description']; 

echo "<item> 
<title>$title</title>
<link>$link</link>
<description>$description</description>
</item>"; 
} 
echo "</channel></rss>"; 
?>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.