Add files via upload
This commit is contained in:
31
rssBuilder.php
Normal file
31
rssBuilder.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?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>".htmlentities($e["title"])."</title>\n";
|
||||
echo "<description>".htmlentities($e["shortDescription"])."</description>\n";
|
||||
echo "<link>https://www.innovationplaylist.eu/lens/app/api/view/UID/".htmlentities($e["UID"])."/render</link>\n";
|
||||
echo "<pubDate>".htmlentities($e["publishedDate"])."</pubDate>";
|
||||
echo "</item>";
|
||||
}
|
||||
?>
|
||||
</rss>
|
||||
<?php
|
||||
return ob_get_contents();
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user