Username: Save?
Password:
Home Forum Links Search Login Register*
    News: Keep The TechnoWorldInc.com Community Clean: Read Guidelines Here.
Recent Updates
[Today at 11:48:22 AM]

[Today at 11:48:22 AM]

[Today at 11:48:22 AM]

[Today at 11:48:22 AM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[February 14, 2024, 02:00:39 PM]
Subscriptions
Get Latest Tech Updates For Free!
Resources
   Travelikers
   Funistan
   PrettyGalz
   Techlap
   FreeThemes
   Videsta
   Glamistan
   BachatMela
   GlamGalz
   Techzug
   Vidsage
   Funzug
   WorldHostInc
   Funfani
   FilmyMama
   Uploaded.Tech
   MegaPixelShop
   Netens
   Funotic
   FreeJobsInc
   FilesPark
Participate in the fastest growing Technical Encyclopedia! This website is 100% Free. Please register or login using the login box above if you have already registered. You will need to be logged in to reply, make new topics and to access all the areas. Registration is free! Click Here To Register.
+ Techno World Inc - The Best Technical Encyclopedia Online! » Forum » THE TECHNO CLUB [ TECHNOWORLDINC.COM ] » Programming Zone » PHP
 RSS Feeds – Adding a Feed to a Website Using PHP
Pages: [1]   Go Down
  Print  
Author Topic: RSS Feeds – Adding a Feed to a Website Using PHP  (Read 3358 times)
Daniel Franklin
TWI Hero
**********


Karma: 3
Offline Offline

Posts: 16647


View Profile Email
RSS Feeds – Adding a Feed to a Website Using PHP
« Posted: September 26, 2007, 01:18:42 PM »


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!

Kevin Allman is webmaster with over ten years Internet experience. He runs a Search Engine Optimization website at http://www.pzeta.org/seo_global/ which contains many articles on how to optimize your website.

Article Source: http://EzineArticles.com/?expert=Kevin_Allman

Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Copyright © 2006-2023 TechnoWorldInc.com. All Rights Reserved. Privacy Policy | Disclaimer
Page created in 0.098 seconds with 24 queries.