Back to Top

How to Read an RSS Feed With PHP

Recently I had a project that involved reading RSS feeds.I have created a simple PHP Script to read RSS Feed.

I have used simple XML element to read the feeds and then breaking it down based on structure. Sometimes it has been hard to deal with the some non-standard feeds.So today I am going to show you how you can extract RSS XML feed data.

Here, I have used bitsontherun host and stream videos and to display information of videos. I have used RSS XML feed and only extracted the values I needed, but you can extract any feed data with below code.

Now, let’s move to the coding part.Here, I have used thumbnail and date to extract from feed and getting display on the screen.

Also Read:

Introduction to Transient API in WordPress
Parsing an RSS Feed with WordPress
To parse CSV Data in PHP

In a lot of conditions, It may be easier to use a simple XML element, but I recommend this function when you need the string output.

That’s it.I hope this post will help you. Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

How to set a Cookie in PHP

Posted on 6 years ago

Bhumi

An Introduction to WordPress Action Hooks

Posted on 5 years ago

Bhumi

Fixed Remove class issue with MooTools

Posted on 6 years ago

Bhumi

Synchronous Up & down Slider with jQuery

Posted on 6 years ago

Bhumi