Moishe Logo

Add RSS feeds to your website



Why do people visit the same websites day after day? Well, there are a number of reasons, one may be that the website offers a tool that they use like a search engine, but for most repeat visitors, it is to see what's new on the site. News is one of the most popular items on the web these days and a website with constantly updated news has a much better chance of attracting a return audience. Also, search engine spyders love content that changes, if your site has a news feed that the spyders can read, they are far more likely to come back sooner and more often.

So, how do I get spyder readable news on my site, you might ask. Well, it's actually pretty simple:



  1. Download moishe-php.rss.php from this page.
  2. Open it in a text or PHP editor.
  3. Insert the address of the RSS/XML feed in place of the example feed at the top of the script.
  4. Save the file and upload it to the folder on your website where the page you want the feed on resides.
  5. Add a PHP include (text available below) to the page you want the feed on.
  6. Upload that page.
  7. Option: Edit your CSS file to format the text feed, edit the PHP file for number of feed items.

Download the PHP file HERE and unzip it.

Here is the text you place on your webpage.

<?php include ("moishe-php-rss.php"); ?>

By default, the feed will format like your website, but if you want to do special formatting you can create 2 new classes in your CSS file. Itemtitle will affect how the clickable news headline will appear and itemdescription will affect the news snippet, for example:

     .itemtitle {text-align:center;font-size:14px;font-weight:bold} .itemtitle a{color:red;text-decoration:none}, would cause your headlines to be
     14 pixels, bold, red and with no underline

The other item that can be edited is the maximum number of articles for the feed. By default it is set at 10, this can be edited by changing the 2-10's in the line
"if (count($rss_channel["items"]) > 10) {$NumberOfitems = 10;}"
to whatever number you would prefer.



A final note, on some hosting providers, the PHP will not work natively. You must add the following to your .htaccess file for it to work:
AddHandler application/x-httpd-php .htm .html (AddHandler application/x-httpd-php5 .htm .html if PHP 5 is installed)
or if you do not have a .htaccess file, you can download this one, unzip it and upload it to the folder on your host server that contains your index or home page.
Another note: Some providers do not allow custom .htaccess, if that is your case and the PHP doesn't work, contact your web hosting companies support and tell them you need PHP working or get a host that doesn't limit you like Host Gator.



The last question people often ask about RSS feeds is, "where can I find one?". The Internet is full of them, you can go to one of the large generic providers like Topix.net or do a search for the topic you want a feed for and add the word "rss" to the end of your search, there are plenty out there. Here is an example of one for WebmasterWorld.com:

Nasdaq: Ten Years After Dot Com Stocks Peak At Over 5000

"It was exactly 10 years ago that the Nasdaq index reached its all-time peak of 5,048.62, and the tech-heavy index has never come close to recovering. It closed Tuesday at 2,340.68, 54 percent below its dot-com bubble high on March 10, 2000."

Google: Most of The Internet is Our Competition

"We face formidable competition in every aspect of our business, particularly from companies that seek to connect people with information on the web and provide them with relevant advertising. "

Media Ignores Enterprise Level IT

"These are tech vendors with billions in profits that are largely ignored by business press... Oracle ($22 billion in revenue, $5 billion in profits) only cracks the top 10 companies by coverage for one of the eight publications..."

Twitter Starts Routing All Links Through New Anti-Phishing Service

"By routing all links submitted to Twitter through this new service, we can detect, intercept, and prevent the spread of bad links across all of Twitter."

Geographic Refinements added to Google Search Options

"... "Show options" toggle and noticed a whole slew of geographic options that were new to me, including "nearby" and others, too. Apparently it all depends on what "default location" Google has recorded for your computer."




Online since June of 2000, ©2008 The Moishe Co.