Source

hackerhub / rss.php

<?php
$feed_data = new SimpleXMLElement(getDataFromUrl($content_data->content, false, false));
?>
<h1><?php echo $feed_data->channel->title ?></h1>
<div class="feed">
<?php
$items = $feed_data->channel->item ? $feed_data->channel->item : $feed_data->item;
foreach($items as $item){
	$date = $item->pubDate;
	if($date){
		$time = strtotime(strip_tags(trim($item->pubDate)));
		$age = time() - $time;
		$date = date("Y-m-d H:i:s" ,$time);
	}
	$item->title = strip_tags(trim($item->title));
	$item->link = strip_tags(trim($item->link));
	if($date) echo "<small class='date'>$date</small>";
	if($content_data->show_description) echo "<h2><a href=\"$item->link\">$item->title</a></h2>";
	else echo "<h4><a href=\"$item->link\">$item->title</a></h4>";
	if($content_data->show_description && $item->description){
		echo "<p style=\"overflow:auto;padding:1px 0;\">$item->description</p><hr>";
	}
}
?>
</div>