This is part two of a two part series. In this part you will learn how to
put RSS feeds on your site with rss2html so that they will get spidered by
the search engines. Using this method can turn other people RSS feeds into
constantly changing content for your site. If you would like to see this
article in it's entirety please visit the link in the authors bio.
Adding RSS Feeds To Your Web Page Using RSS2HTML
RSS2HTML is a script that easily runs from your web host. It is a single php
file that will show the RSS feed in html. This allows search engine spiders
to gobble up your RSS feed content. This makes the spider think that your
web page is updated every time that the RSS feed changes. In the long run
this will help your page ranking as well as your search engine ranking.
There are many people that have used just RSS feeds to achieve a position
above the fold on all the major search engines.
The first thing we need to do is get your hands on RSS2HTML. To do this
simply go to RSS2HTML dot com and you will be given a few options. RSS2HTML
also offers a service that will show your RSS feed information on a xml page
hosted by them. We don't really want to bother with this since it is not
very flexible. Instead go with option 2 which is download free RSS2HTML
script. Simply go ahead and save the .rar file to your computer and extract
it with winrar.
You should now have three files (rss2html.php, rss2html-docs, and
sample-template). The first one is the actual php file that we will be
referencing on our web page. The second is the documentation for rss2html.
Read this for a further description on rss2html and how to make your own
templates. The third file is the template. This file controls how your feeds
are shown on your page. There are more templates available for RSS2HTML that
will allow you to put pictures, audio, or videos next to your RSS feed
information.
There are two ways to use RSS2HTML. To use RSS2HTML in it's simplest form we
will simply add a link on our page that will load up the code as a stand
alone page. First you will have to upload rss2html.php and the
sample-template.html file onto your sites root directory. This should be the
same place your homepages index file is.
Once this is done go ahead and make a link using relevant keywords that
directs to the following page after you alter it.
http:///rss2html.php?XMLFILE=&TEMPLATE=&MAXITEMS=
We will now have to go ahead and edit a few parts of this link. First off
make the part that says into your actual domain name including the www. and
the .com. Second edit the part that says and make it the url to the RSS feed
you want to publish. Last go ahead and change to sample-template.html or
whatever template you want to use. If you want you can also change the
max-items to the number of RSS feed entries you want to display. When
editing make sure you replace the whole section including the < and >.
Now go ahead and make that link we where talking about and make it point to
the url we just made. Go ahead and upload your page again and it should now
have a link that directs you to a new page that contains your RSS feeds
entries. Now when you click on the link we made it will bring up a page that
contains said RSS feed as its contents. This page is able to get spidered by
the search engines but you would probably want something that you can imbed
into an existing page.
Now lets talk about using rss2html so that it will make just a php file that
can be included on any of your web pages. Like the last method we want to
upload both of the files we did before. But before you do we have to edit
the .php file.
The first thing we want to do is rename rss2html.php to a more suitable
name. In this example we will say that we are putting this on a billiards
site. So I would rename it to something like billiardsrss.php or something
else easy to remember. Now go and open the file in notepad or word pad. You
should now see a bunch of code that probably means nothing to you. No
problem there are only a few places you need to find.
Now with the file opened go ahead and look for a spot near the beginning
that says this $XMLfilename = "sample.xml"; . Go ahead and change the
sample.xml to the url of your RSS feed. Next go and find the section that
looks like this $TEMPLATEfilename = "BasicWebpage.htm"; or $TEMPLATEfilename
= ""; . In these quotes we want to put our template file. So change
BasicWebpage.htm to our sample-template.html that was included in the
download. Finally we can edit the maximum entries we want shown by finding
$FeedMaxItems = 10000; and changing the 10000 to whatever amount you want to
show. The first two changes will be right at the top of the file and the
last is about one quarter the way down.
Note: Some RSS feed url's will use special characters. This may throw off
rss2html so you will need to use some special characters in their place.
Please refer to the rss2html documentation if you need more help with this.
Now next we will want to add include the php file on your web page. To do
this your web page must end in .php. You should be able to change your .html
or .htm page to a .php with absolutely no problems. Now go and find the spot
you want your feed to show. All we will have to do here is put the following
code where we want the RSS feed to show.
This piece of code is no different than the rest that we have used so far.
First off change the your domain to your domains actual name. Then go and
change yourphpfile.php to what you have named your php file to. Now go ahead
and upload your file once you have pasted in your personalized code in it.
Now when you go to the page we just uploaded you should see your RSS feed
information in the section you posted your php include in. You may want to
go and put your php include code in a cell to make it look a little cleaner
and separate it make it stand out from the rest of the page.
Now that you are armed with all the information you should need to start
publishing RSS feeds on your web page. So go out there and start filling
your web page with RSS feeds that will keep them search engine spiders
feeding everyday.
About the Author
This complete RSS Feed article is posted on Guru Of Info.