SimplePie 1.3.1 is now available. Upgrade now!

SimplePie Documentation.  Learn how to use this thing.  It's way better than going to school.

You are here: Documentation » SimplePie Plugins and Integration » CakePHP » SimplePHP

SimplePHP

The Basics

Main page SimplePHP
Author Matt Curry (based on work by Scott Sansoni)
Plugin Version 1.0
Compatible CakePHP version 1.x
Download Download
Required SimplePie version 1.0
Optional Helpers Unknown
Plugin Support None

About the Plugin

SimplePHP is a PHP class for retrieval and parsing of RSS feeds. This is a wrapper to that class making it easy to use in the CakePHP framwork. Much of this component is taken from the work of Scott Sansoni (http://cakeforge.org/snippet/detail.php?type=snippet&id=53). This is mostly an update so the component works with the lastest version of SimplePie.

What Do I Need To Know?

These instructions assume that you have a familiarity with working with the CakePHP framework.

Installation

Fresh Installation

Step 1: Download both the required files above

Download SimplePie and unzip the contents. Move the simplepie.inc file to one of the vendors folders. Rename the file to simplepie.php. I like to put the file in the subfolder with the README.txt and LICENSE.txt for easy reference.

Download the SimplePHP component and unzip it to app/controllers/components.

Step 2: Include it

Include the component in any controller that will need it.

Usage

How to use it

In your Controller Class:

<?php
 
$items = $this->Simplepie->feed('http://feeds.feedburner.com/pseudocoder'); 
 
?>

In your View Template:

<?php
 
foreach($items as $item)
{
	echo $html->link($item->get_title(), $item->get_permalink()) . '<br />'; 
}
 
?>

plugins/cakephp/simplepie_module.txt · Last modified: 2011/03/05 19:56 (external edit)