<?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')
);
|