I have been racking my brain trying to think of how this would work to no success. Can anyone explain how this could be done?

Recommended Answers

All 2 Replies

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.

Here is the basic structure of an RSS feed.

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

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

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


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


// your db related code...

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

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

while( // $row data from your db query)

echo "<item> 
echo "</channel></rss>"; 
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.