Integrating RSS feeds into your website…


March 16th, 2007

Targeting users to read about your company can be a difficult proposition. Customers usually just want to know what you can provide and how you can help them. If they are not immediately interested or captivated, it is more likely than not that they will leave and not return.

By integrating a blog feed into the pages of my website I hope to coax my customers and readers into wanting to know more and therefore feel like they are closer to the company. This can make customers more loyal.

Blog software is so user friendly that it already provides the facility to enable its readers to subscribe to an RSS feed – but normal websites dont have an immediate avenue to integrate that feed and maximize its benefit. After all – it is highly likely that the people visiting my website will be the people that will be interested in how it was created, as it is a Holdings company and doesnt really provide much value.

By doing a quick search of google I can find just a couple of good, php based, RSS feed parsers available :

  1. MagpieRSS
  2. Simplepie


I only mention the php based parsers as this is what is currently relevant to me. If anyone wishes me to conduct a more thorough investigation – just let me know.

I decided to work with the Simplepie RSS parser to integrate my blog feed into the www.mcnicholl.com website.

Lets get to the coding :

require 'location of directory/simplepie.inc';
$in_feed = new SimplePie();
$in_feed->cache_location(location of cache directory);
$in_feed->feed_url(link to the feed);
// now simply initiate the feed
$in_feed->init();

Thats practically all you have to do. The $in_feed variable now holds the rss feed. It is truely very simple with SimplePie. :-)

In order to print out each post in the feed you could just create a for loop and print them out with the following functions :

  1. get_feed_link();
  2. get_feed_title();
  3. get_item_quantity();
  4. get_item();
  5. get_permalink();
  6. get_title();
  7. get_description();
  8. get_date();

…and that is only the functions that I currently know.

In the future I plan to create a simple drop in – no programming rss feed parser for any website. All the user will have to do is include the RSS feed link. I’ll update everyone here when this is available.

Categories: RSS, Website

10 Responses to “Integrating RSS feeds into your website…”

  1. [...] Integrating RSS feeds into your website… [...]

  2. Wanted to compliment on your site, it looks really good .

    Hank

  3. Gemini says:

    I have an intranet in my office. I want to integrate RSS feeds from one intranet site onto another site. How do I do it? We need username & password to login to this intranet. Please advise. Thanks.

  4. Gemini says:

    I have 2 sites on intranet (which requires username & password). Site 1 offers RSS feeds and I want to display these feeds on Site 2. How do I do so?

  5. Salvaza says:

    I found your site on google and read a few of your other posts. Keep up the good work.

  6. Holly Leakey says:

    Yeah, thankyou very much,I must comment that your site is fantastic! :-P

  7. Damon Krikwen says:

    Finally, I found the information I was looking for. I have been doing research on this subject, and for four days I keep entering sites that are supposed to have what I am looking for, only to be discouraged with the lack of what I needed. I wish I could have found your web-site sooner! I had about 30% of what I needed and your site has that, and the rest of what I needed to complete my research. Thank you and keep up the good work!

  8. Tim says:

    Thanks for the tutorial! Really helpful :) .

    I wanted to share with you and your readers that if you want a dead-simple, yet beautiful RSS feed widget to embed RSS feeds onto your website/blog, check out Tint ( http://www.tintup.com/blog/the-best-rss-widget/ ).

    All it requires is for you to specify a RSS feed URL and paste in one line of code. It will really bring some life into your site.

    Check it out here: http://www.tintup.com/blog/the-best-rss-widget/

    Thanks,
    Tim

  9. Rickie says:

    I appreciate, cause I found just what I was taking a look for.
    You have ended my 4 day lengthy hunt! God Bless you man. Have a nice day.
    Bye

    Also visit my web site; properties in Albox for sale (Rickie)

"Thought leadership is how winners are differentiated in business."