We are updating, some features may not work !
Please leave a feedback if you face any problem.
How to make a Feed ? >> Add atom feed to your website ?
X

Add atom feed to your website ?


0

The advantage of adding feed to your website will be satisfied and informed users. Users subscribe to your feed so that they can always check latest content through a feed reader without coming back to your website (in case of full text feed). The users are free to unsubscribe whenever they want to. Thus feeds give them complete independence of following or unfollowing your content, compare it with e-mail subscription where the process is not transparent (read trustworthy). If your feed only gives a summary of the content the users can always check back at your website, however its annoying and full text feed are always welcomed by your User.

A great tutorial of Creating an Atom Feed in PHP can be found at
www.ibm.com/developerworks/opensource/library/x-phpatomfeed/index.html

Additionally for details of various Atom feed tags, you can refer
www.atomenabled.org/developers/syndication/

I created the atom feed for www.jahajee.com referring to above two webpages in 3 hours.
I am also using additional tags like <icon></icon> and <logo></logo> in the feed section.
If you have a permanent domain name for your website then use that for the <id> tag as certain browser like Firefox gives an option to open the "title". If your Domain name is the id then clicking on that will open your website else it opens a blank page.

The Complete Atom preamble for my website looks like

<?xml version="1.0" encoding="iso-8859-1"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>JAHAJEE</title>
  <subtitle>Recent Topics on JAHAJEE</subtitle>
  <link href="https://www.jahajee.com/syndication.php" rel="self"/>
  <icon>https://www.jahajee.com/favicon.ico</icon>
  <logo>https://www.jahajee.com/css/banner.jpg</logo>
  <updated><?php echo date3339();?></updated>
  <author>
      <name>JAHAJEE</name>
      <email>support@jahajee.com</email>
      <uri>https://www.jahajee.com/user/JAHAJEE/</uri>
  </author>
  <id>https://www.jahajee.com/</id>

For the topic feeds I am using the PHP Code almost as given in the tutorial. Once everything is set and your atom feed is validated by the Feedvalidator, you can add the below meta tags within the <head></head> tags of all pages of your website.   
<link rel="alternate" type="application/rss xml" title="WEBSITE NAME" href="/syndication.php">Adding this in your meta tag will allow the browser to highlight the "Subscribe to this Page.." indicating the Users that your website offers Feeds for subscription (Live Bookmarks for Firefox).

Now the browser knows that you offer atom feeds for your website but still the users do not know where to find them. So you need to add the link for subscribing your website feed. You can use either text link  or image link with the feed address whichever suits you, just remember that the image needs to be that of typical feed icon for easier understanding by your user.
<a href="https://www.jahajee.com/feeds/">Subscribe</a>
Also remember that following the Feed links (URL) result differently in different browsers. While Internet Explorer and Google Chrome opens and displays the complete feed, Firefox opens a confirmation box asking you to "Subscribe with Live Bookmark". I found the Internet Explorer Page source resulted exactly what your Syndication.php would produce and for checking what is offered as feeds you can use IE Page source.

Rishi Kashyap | | EDIT