How to Embed RSS Feeds into HTML Web Pages - The Easy Way

embed rss feeds Q. Yugalkishore is looking for a simple solution to help him embed RSS feeds from Reuters website into his HTML web pages.

A. While there are tons of scripts that convert RSS feeds into Javascript*, I recommend using Google Gadget Creator for adding feeds to web pages - it’s easy as well as customizable.

*If you are looking for a non-Javascript solution, get one of these Flash based RSS widgets from Yourminis or WidgetBox.

add-rss-websiteStep 1: Copy the URL of that RSS feed to the clipboard (make sure you copy the location of the feed, not the website).

Step 2: Append the feed URL to this string- http://gmodules.com/ig/creator?url=

Confused ? Let me illustrate that with a quick example. Say the RSS feed address is http://feeds.labnol.org/labnol, then our string becomes:

http://gmodules.com/ig/creator?url=http://feeds.labnol.org/labnol

Step 3: Open this new link in your web browser, adjust the dimensions of the gadget, change the border color and finally click "Get the Code" button.

<script src="http://gmodules.com/ig/ifr?url=http://feeds.labnol.org/labnol&amp;synd=open&amp;w=320&amp;h=200&amp;title=&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js"></script>

Place this Javascript code anywhere in your web page where you want the RSS items to be displayed.

Your site visitors can now scan the Reuters news headlines without leaving your website.

Related: Create RSS Feeds from Any Website

Find this article at: http://www.labnol.org/internet/tools/embed-rss-feeds-add-html-websites-javascript/2515/

web: http://www.labnol.org/ email: amit@labnol.org


Reader Comments

Thanks again for the information. Currently I use the Google Gadgets news widget, where you can also display news for most countries with headlines…

Simplepie.org offers a PHP RSS parser that you can use to embed feeds on the server-side instead of the client side.

this offers better caching and thus better performance from those pages for the end-user

Thanks, this led me to the Google Feed Gadget that really helped me out.

Happy weekend,
Paula

Thanks for posting. was useful for me

This is really useful, especially for those of us still limited by Blogger. Their RSS feeds only allow for up to 5 line items, but this provides and excellent work-around if you want to have up to — say 10.

RSS is just one of many ‘weak links’ of mine. It looks so very complicated, yet you Amit know to explain it in a very simple and precise manner. It is a pure pleasure to read your posts, especially because they are so short, yet so rich and precise and very useful for every day life.

ok, this is going sound stupid, evey time i try to embed the google gadgets code, it doesnt work, where do i insert, obviously under body, is there some othere tag or somthing????

@nolan: You select ‘Add a page element’ on the layout page of your blog…and select the ‘element that says ‘HTML script’ or something similar to that. Now paste your script here (in the body box) and give it some title (in the title box). Click ok/done > save your layout and you’re good to go. The feeds should appear on your blog now.

Thanks so much for putting this article on about inserting RSS feeds in a simple way. This is very good for getting good contents plus the added benefit for repeat views. Thankyou

Do you know how to add a rss in .php format to .html webpage??

If i only insert a Rss with JS format, serach engine will not read it. So the best way is insert rss in .php format. So search engine will read it.

But the problem is i can’t do that. Please your advice

Regards

Nurlenita From Indonesia

To Nurlenita…

May be my little experience can help you. Few month ago, i have same problem with you. Yes, you right. You can’t insert rss script in .php script to page based in .html
PHP scripts do not automatically work on html pages. If you have an HTML or (.HTM) based site, in order for PHP scripts to run on your .htm or .html pages,
you only have a 2 options;

1. For Apache Servers Edit your .htacess with add this code ===>>> AddType application/x-httpd-php .htm .html <==== Then Add the php code directly to your html pages.

2. For Non apache servers such as Windows or IIS servers, you must creating the SSI include and file.

But sorry, I don’t have any experience with SSI Includes. You can ask the detail about SSI Includes with you webhosting provider. They must be help you. But my advice, you should try
the option #1 to make rss appear in .html or .htm page because 95% servers now using apache server.

Thanks. Hope this little information can help you.

Вакансии строительной компании “Лог-Хаус”
Требуется архитектор на полный рабочий день.
Направление деятельности: проектирование деревянных домов из оцилиндрованного бревна и клееного бруса.
Знание AUTOCAD. Полная занятость.
Расположение: м. Тушинская.
Оформление по Т.К.
Заработная плата по результатам собеседования.

Thank you very much. This is the best solution that i am looking for.

It’s very interesting if we talk about rss feed. I love use rss feed on my site.!

Every i check my AW STAT panel, I see Most of my visitor click my rss feed (News) link. And SE spider (google, yahoo, msn, etc), come to my website every day to spidered my web pages even your website has PR0

Why …?? Because when i use rss feed, the news always change every day (we get fresh content) automatically,
not every day too because when i refresh my web pages the rss feed news was change. And surely my web visitor like it. And The most important, this is totally free and Seo Friendly.

As we know too… Fresh constantly changing content gets spidered by the search engines more often than websites that have had the same content for month or even years. And i can get it totally free when I use news rss feed.

Believe me… Adding RSS feeds to your web pages (On php format not java script) will make your visitors come back more often. And it’s SEO Friendly too. Okay, try it. And you will get prove what i say. :)

Thanks… I’ve managed to put an RSS feed upon my website in about 10 mins. Excellent article. Plus I’m impressed with me! Thanks for the help

Hey, your post is awesome. After i read your posting about rss feed and read some comment here. Then i go to google to search free rss feed reader to put on my blog. After found free rss feed reader, and i put it on my blog haa… My site more beauty… I can use rss from almost news publishing site. Many thanks to Mr.Amit Agarwal and other to post and answer for this topic. Thanks again.

I guess if you can run php, it’s better to use simplepie. It has caching and parsing is done in the server side, so you can do away with the dirty work of javascript.

People of little know-how have their browsers turned off javascript by default. Nevertheless, oftentimes javascripts cause some popup whether you should allow it or not in your browser.

I wonder if this will work if the code is put into a database record, so the feed can be displayed on a dynamic page?

If you have a question or suggestion that is not related to the above discussion, please post it in this forum. All comments are moderated.

Add a Comment

required, use real name
required, will not be published
optional, your blog address

« Back to main

Google Custom Search