Build a RSS 2.0 feed with CodeIgniter?

RSS (Real Simple Syndication) feeds can be found everywhere on the internet. News and information are delivered using it and discussions forums, blogging sites enable usually different types of feeds for their users.

Whenever content defined by the RSS feed changes, feed offers to get an update. As an example, a blogging site could offer types “Full site feed”, “Comments-only feed”, “Label-specific site feed”, “Individual post comment feed”.

Here In this Tutorial, We will build RSS Feed With CodeIgniter Framework

I am assuming that you know basic installation of CI application, if no please have look on CodeIgniter Tutorials

Well, Then Create a CodeIgniter Controller (Class) in Controller folder (applications/controllers/feed.php) called feed.php,

I have commented each and every line just go through the lines

Then its time to create view file , go to views folder it is located at controllers/views, Create a file called
feed_view.php,

Dynamic Rss Feed

We can easily Generate RSS feeds dynamically with very simple Coding.

Create a model Called rss_model.php in controller/model/.

then load this model in our controller with following line

then call the model methods in controllers and pass it to views, see the complete controller

final step make the change in views file , open our view file called feed_view.php

Thank so much !

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

Arjun
I am Arjun from Hyderabad (India). I have been working as a software engineer from last 7+ years, and its my passion to learn new things and implement them as a practice. Aside from work, I likes gardening and spending time with pets.
DMCA.com Protection Status