A free, self-hostable aggregator…
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
628 B

<?php
$opml_array = array(
'head' => array(
'title' => Minz_Configuration::title(),
'dateCreated' => date('D, d M Y H:i:s')
),
'body' => array()
);
foreach ($this->categories as $key => $cat) {
$opml_array['body'][$key] = array(
'text' => $cat['name'],
'@outlines' => array()
);
foreach ($cat['feeds'] as $feed) {
$opml_array['body'][$key]['@outlines'][] = array(
'text' => $feed->name(),
'type' => 'rss',
'xmlUrl' => $feed->url(),
'htmlUrl' => $feed->website(),
'description' => htmlspecialchars(
$feed->description(), ENT_COMPAT, 'UTF-8'
)
);
}
}
echo libopml_render($opml_array);