summaryrefslogtreecommitdiffstats
path: root/website/new/feed.php
blob: a92f98576e38882979cbf43cc6b5f4a900388790 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<div id="feed">
<p>Below are the latest 3 message subjects from the <a href="https://www.redhat.com/mailman/listinfo/et-mgmt-tools">et-mgmt-tools list</a>:</p>
<ul>
<?php

require_once('magpierss/rss_fetch.inc');

$url = 'http://rss.gmane.org/gmane.linux.redhat.et-mgmt-tools';
$rss = fetch_rss($url);

	for ($i = 0; $i < 3; $i++) 
	{
		$item_array = $rss->items;
                $item = $item_array[$i];
		$href = $item['link'];
		$title = $item['title'];
		$body = $item['description'];
		$author = $item['dc']['creator'];
		$raw_timestamp = $item['dc']['date'];
		$unixtime = strtotime($raw_timestamp);
		$timestamp = date('g:i A T j F Y', $unixtime);

		echo "<li><a href=$href>$title</a></li>";
	}
	

?>
</ul>
<p>
[ <a href="https://www.redhat.com/archives/et-mgmt-tools/">View More ...</a> ]</p>
</div>