Those who run web servers, or those who have input to their hosting company, will find these php scripts helpful in producing RSS feeds on a web site. Don’t dismiss these tools only because you already have an RSS-producing mechanism. Remember: A mechanic has more than one tool in his toolbox.
Here’s an example of a template you could use to produce the html:
~~~BeginItemsRecord~~~ ~~~EndItemsRecord~~~
| ~~~ItemTitle~~~ |
| ~~~ItemDescription~~~ |
Pretty simple, isn’t it?
And here is an actual page that uses the above template, and the rss2html script, to produce an html page. If that doesn’t seem interesting, take a look at several RSS feeds used on a page with CSS styles applied (page best viewed with FireFox). Everything on the page (except the header, navigation and titles comes from RSS feeds using that simple template above and the rss2html script. Note: The name of the page ends in “.php” so that the php(include) function can be used to include each feed into its assigned position on the page. In all, there are six feeds displayed on the page that use the template and rss2html script combination. (We’ll talk about using javascript to display RSS feeds in another article)
The result of all this intervention is an html page full of RSS feeds that don’t look like your typical RSS feeds, and when you update the feeds, you automtically update the page — all without having to open an html editor or Content Management System page.
If you want to see the process of creating an html page from an RSS feed in action, go here, select Option 1 and take the script out for a spin online. By the way, once you’ve created your page, you can link to it on your site, or include it on a page on your site. Have fun!
(Next: SimplePie)
Learning php is not easy task but information to using php in different type and different way and how to use web servers and script and how to applied css in php. really nice information thanks.
Posted by phponlys | May 27, 2010, 7:21 am