O'Reilly logo

PHP jQuery Cookbook by Vijay Joshi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying RSS feeds with jQuery and PHP

In this recipe we will fetch a Really Simple Syndication (RSS) feed of a blog using PHP and then display it in the page using jQuery. RSS is a standard format for publishing feeds and there are several formats of RSS feeds. The feed we will use is in RSS2.0 and its standard structure is shown in the following screenshot:

Displaying RSS feeds with jQuery and PHP

Getting ready

Create a folder named Recipe5 inside the Chapter9 directory.

How to do it...

  1. Create a file index.html inside Recipe5 folder. In this file, define some CSS styles for elements and create a div with ID results, which will serve as a container for displaying posts from the feed.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required