RSS feed need some help please

Hi, can I ask some help I was asked to create an RSS feed,but I have no idea about this because, I never tried this before implementing in my website. How can I create RSS feed ?

Thank you in advance.

Well, I do it by manually editing an XML file and linking to it in the header of my html code. But then my site isn’t database-driven, so there’s no real option.

The idea (as I understand it, which might prove to be “not very well at all”) is that an RSS feed is something that your readers can subscribe to which will show them updates to the site, or in fact any changes you want to feed to them. It’s basically like an old-style email list where instead of emailing them when you post a new article or product, their RSS reader deals with it because it notices your XML file has changed.

The technicalities of it are that you have an XML file in a certain layout on your page, and you link to it in the html header, which causes the browser to light up the RSS icon. Exactly how you populate that XML file is down to you - either you can manually edit it (like I do), or if articles are added to your web site by users uploading them to a database in the style of a CMS, then you can have the upload routine regenerate the XML file each time a new article is uploaded.

So in my header code I have:

<link rel="alternate" type="application/rss+xml" title="My RSS Feed" href="http://www.mysite.org.uk/myrss.xml"  />

And in my XML file, it’s basically like this, with the “item” section repeating for each update.

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
  <title>My Test RSS feed</title>
  <link>http://www.mysite.org.uk</link>
  <description>News from the site</description>
  <lastBuildDate>Tue 13 Jul 2010 15:00:00 GMT</lastBuildDate>
  <language>en-us</language>
  <item>
    <title>Canal Trip 2009</title>
    <link>http://www.mysite.org.uk/canal2009.shtml</link>
    <pubDate>Mon, 30 Nov 2009 12:55:00 GMT</pubDate>
    <description>Some photos from the recent club canal trip.</description>
    </item>
  <item>
    <title>....</title>
    </item>
  </channel>
</rss>

ETA - looks like I have to read more on this as I can’t see where IE11 does anything about it. I don’t see an icon like I used to, so maybe something changed.

Thank you for giving some idea. Is RSS has standard xml structure ? .

like

<item>
   <link></link>
   <pubdate></pubdate>
  <description></description>
</item>

<item>
   ..
   ..
  ...

</item>

Do you send also notification to your subscribers that you have new updates ?

Thank you in advance.

Yes, standard XML structure, I just got tired of typing above. I think the point of RSS feeds is that you don’t have to send notification, their RSS reader will periodically check - but I’m not sure about that. Plenty on the web gives more detail.

Thank you :slight_smile:

Check out this page for a lowdown on RSS https://www.mnot.net/rss/tutorial/

If you want a PHP library, then take a look at https://github.com/mibe/FeedWriter

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.