Join Mainstreet Affiliates

Creating RSS Feed in PHP

Adding RSS feeds to your site is an excellent way to have content that updates itself. Once you have placed the RRS feed, that's it you are done and the content updates itself.

More and more Affiliate Programs are now starting to offer tracked RSS feeds, it is time to add them to your site. The only problem with RSS feeds is that they are not easy to get on your site. The main thing to make sure is that your web site is able to have RSS feeds on them. For what we are going to show up you will need a web site that supports PHP. Also we will be using Dreamweaver to place the RSS feed.

Step one

RSS feeds

The first step is to make sure that you have the right connection to the server, to do this in Dreamweaver go to the top menu and click on Site, then in the drop down menu click on manage site. In the manage site box choose the site you would like to place the RSS feed on and press edit button.

Once the Site definition Box opens up in the Server model you want to click the down arrow and choose PHP MySQL.

Next in the Access box click the down arrow and choose FTP.

In the FTP Host line fill in ftp.yourwebsite.com

The fill in your Login and Password.

Refer to the image on the right.

 

Step 2

RSS feeds

The next step is to create a new XSLT fragment. To do this all you have to do is go and click on File. In the drop down menu click on New. The when the new document file box opens, click on the general tab. The click on Basic page, and the finally XSLT (fragment) Example to the right

 

RSS feeds

When you click create you will see a box like the box on the right. Since you are going to be using a URL for your source of the RSS feed click on the second circle, the Attach a remote file on the internet. The in the space provided enter the URL.

 

RSS feeds

In the Bindings window you should see something like the image to the right. Now all you have to do is choose what you want. For example if you want title, pudDate and Description all you have to do is click and drag them into your page. Your page will look something like this

{rss/channel/item/title}{rss/channel/item/pubDate}

{rss/channel/item/description}

Once you have all the parts that you want all you do is highlight all of the elements. After you have done that click insert on the top menu. Then in the drop down region hover over XSLT Objects, then on the pop up menu click on Repeat region. A pop up window will open with a similar menu to the one on the right. Click on the <>item directly above all of the parts that you selected, then press okay and you now are down the XSLT Fragment.

 

Step3

The final step is to add the XSLT fragment into the page where you want the RSS feed to show up. The main thing to remember her is that the page need to be a PHP page. Choose where you want the feed to be and all you have to do is insert your XSLT Fragment. To do that click on Insert in the main menu, then in the drop down hover over Application Objects, then in the pop up menu click on XSL Transformation. And you are done, you now have content that will update itself.

 

More Marketing Tips