<?php
include_once('../../mainfile.php');
include_once(XOOPS_ROOT_PATH . '/class/cafeRSS.php');

$defaultrssfeedURL = 'http://slashdot.org/slashdot.rdf';

if (!empty($HTTP_GET_VARS['rssfeedURL'])) {
	$rssfeedURL = $HTTP_GET_VARS['rssfeedURL'];
} else {
	$rssfeedURL = $defaultrssfeedURL;
}

$rss = new cafeRSS();
$rss->assign('items', 5);
$rss->assign('use_cache', 0);
$rss->assign('cache_dir', './tmp');
$rss->display($rssfeedURL);

?>
<p>
<form method="GET">
Load another RSS feed:<br />
URL: <input type="text" class="text" name="rssfeedURL" value="<?php echo $rssfeedURL ?>" size="35" /><br />
<input type="submit" class="button" name="submit" value="OK" />
</form>
</p>
