Read RSS Feeds with SimpleXML

by in , , on

RSS(Really Simple Syndication) is used to distribute updated web content of the website to all over the world. It is generally used by those who updated his work over the web such as blog entries, news bulletins, audios or videos. RSS basically a Standardized XML format which allow publishing the data on the web and easily reading by any programming language Like Java, .NET, PHP etc. RSS provide benefit to there user who want to get the favorite latest information from subscribed website.

Here is an example to read RSS feeds with SimpleXML. SimpleXML is a extension of PHP that allow users to read or manipulate xml data. If you want to use this extension then you have to use PHP5 or grater then.

In this example i have wordpress blog RSS file placed in my local folder. And here is the code:

 

in the above example you just echoing the title from the RSS file. If you want to add some information in your database like title, link or whatever you want then follow the below code: