This repository has been archived on 2024-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Lens/rssBuilder.php
2021-03-21 11:46:26 +01:00

32 lines
974 B
PHP

<?php
function rss($a)
{
ob_start();
echo '<?xml version="1.0" encoding="UTF-8" ?>';
?>
<rss version="2.0">
<channel>
<title>Lens - Innovationplaylist.eu</title>
<link>https://innovationplaylist.eu/lens</link>
<description>Piattaforma di trasparenza di Innovationplaylist.eu</description>
<author>mascarello.mattia@innovationplaylist.eu</author>
<language>IT_it</language>
</channel>
<?php
foreach($a as $e){
echo "<item>";
echo "\n<title><![CDATA[".($e["title"])."]]></title>\n";
echo "<description><![CDATA[".($e["shortDescription"])."]]></description>\n";
echo "<link>https://www.innovationplaylist.eu/lens/app/api/view/UID/".($e["UID"])."/render</link>\n";
echo "<pubDate>".($e["publishedDate"])."</pubDate>";
echo "</item>";
}
?>
</rss>
<?php
return ob_get_contents();
}
?>