Home arrow MySQL arrow Building a Generic RSS Class With PHP

Building a Generic RSS Class With PHP

Ever wondered how to build an RSS XML feed from your site using PHP? In this article Mitchell explains what RSS is, and steps you through building a generic RSS generating class with PHP and MySQL.

Author Info:
By: Mitchell Harper
Rating: 4 stars4 stars4 stars4 stars4 stars / 18
November 05, 2002
  1. · Building a Generic RSS Class With PHP
  2. · What is RSS and How Does It Relate to XML?
  3. · Building Our PHP Class
  4. · The GetRSS Function
  5. · Testing Our Class
  6. · Conclusion

print this article

Building a Generic RSS Class With PHP
(Page 1 of 6 )

It seems that every site provides an RSS XML feed these days - even we do. But what is an RSS XML feed, why would you want to create one, and how the heck do you create one?

Well, in this article I'll attempt to answer all 3 questions for you, the intermediate PHP developer. In this article you will learn what RSS XML is and how to generate your own RSS XML file from a class that we will build in PHP. This class will connect to a database, grab the appropriate fields, and split out a nice RSS compatible XML file that you can share.

To implement the class that we will create, you need at least PHP v4.1 installed. Note that you don't need any sort of XML support enabled -- we will simply be using mysql_xxx functions and joining some strings together.

You will also need access to a MySQL database, which is where we will get the content to build our RSS XML data. I will assume that you have an intermedia knowledge of PHP, basic knowledge of XML, and no knowledge of the RSS standard.
blog comments powered by Disqus

- MySQL and BLOBs
- Two Lessons in ASP and MySQL
- Lord Of The Strings Part 2
- Lord Of The Strings Part 1
- Importing Data into MySQL with Navicat
- Building a Sustainable Web Site
- Creating An Online Photo Album with PHP and ...
- Creating An Online Photo Album with PHP and ...
- PhpED 3.2 More Features Than You Can Poke ...
- Creating An Online Photo Album with PHP and ...
- Creating An Online Photo Album with PHP and ...
- Security and Sessions in PHP
- Setup Your Personal Reminder System Using PHP
- Create a IP-Country Database Using PERL and ...
- Developing a Dynamic Document Search in PHP ...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials