skip to main | skip to sidebar

Saturday, June 18, 2011

Gameknot-the premire chess battlefield

Play chess online
Posted by Somnath at 5:52 AM No comments:
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Dreams

Blog Archive

  • ▼  2011 (1)
    • ▼  June (1)
      • Gameknot-the premire chess battlefield
  • ►  2008 (17)
    • ►  October (1)
    • ►  February (3)
    • ►  January (13)

Dreams

My photo
Somnath
Kolkata, West Bengal, India
I am a maniacal frenzy, who likes to ride his hooby-horse not so peacefuly down the kings highway,but to chase the unknown, keeping the storm where it belongs "teacups"
View my complete profile
 

RSS Feed--Adding a feed to a webpage using PHP

RSS Feeds – Adding a Feed to a Website Using PHP

Adding an rss feed to your website is not as difficult as most people believe. The great thing about adding RSS feeds to your website is that the feed can keep your page content updated automatically since you are ‘streaming’ information directly from another website to your page!


The method of adding RSS feeds discussed below involves the use of PHP and HTML. o


To get started with streaming an RSS feed, you need to dwnload a package called RSS2HTML which makes it easy to add feeds to your website.


You can download the RSS2HTML package fromhttp://www.feedforall.com/download/


Once the files are unzipped, upload the php file rss2html.php to your server.


RSS2HTML uses templates to define how the news feed should be displayed, so you will also have to upload the template file included in the package to your server (template1.html). Once those files have been uploaded, loading an RSS file is easy!


Choose the HTML file you would like the RSS file to be loaded in, and rename the file to have an extension of .php instead of .htm Next, include the code snippet below in your new php file *MAKE SURE THAT THE CODE IS ON ONE LINE*


< ?php include('http://www.yourserver.com/rss2html.php?XMLFILE=http://ww w.searchenginewatch.com/sew.xml&TEMPLATE=http://www.yourserver.or g/template1.html&MAXITEMS=20 target="_blank">'); ? >


Let me explain what’s going on in the code above; the first URL rss2html.php, is the path where you have uploaded your rss2html file;


the XMLFILE variable is the URL of the RSS news feed,


the TEMPLATE variable contains the URL of the template which defines how the news feed should be displayed. You can edit this in notepad if you want.


The MAXITEM variable defines how many items in the RSS feed should be displayed. (For more information about items in news feeds, consult the ‘Making an RSS feed’ article)


That’s all there is to it! The php file should read the XML RSS file and display the contents using the template file.


As for where to find RSS feeds to add to your website? Try the rss feed engines http://www.octora.com orhttp://www.bloglines.com


That said, go on and have fun adding feeds to your website!