PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Raphael  >  Geek's RSS  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example File
Class: Geek's RSS
Parse and extract items from RSS feed
Author: By
Last change:
Date: 5 years ago
Size: 928 bytes
 

Contents

Class file image Download
<?php
/*
 * example.php
 * example file for geeksrss class
 *
 * Author: Raphael Michel <webmaster@raphaelmichel.de>
 * Copyright: 2009 geek's factory
 * License: GNU Lesser General Public License
 */
require_once('rss.class.php');

$rss = new geeksrss;

// Load RSS from File
$rss->loadFromFile('example.rss.xml');
   
// OR: $rss->loadFromString($rss);

//////////////////// METHODS ////////////////////
var_dump(
       
// Get all properties of the channel
       
$rss->getAllChannelData()
    );
var_dump(
       
// Get a channel property x
       
$rss->getChannelData('link')
    );
var_dump(
       
// Number of Items
       
$rss->itemCount()
    );
var_dump(
       
// Array with all items and their properties
       
$rss->getAllItemData()
    );
var_dump(
        
// Get a property y of item x
       
$rss->getItemData(1, 'guid')
    );