31 lines
978 B
PHP
31 lines
978 B
PHP
<?php
|
|
header('Content-Type: application/xml');
|
|
include('templates/config.php');
|
|
?>
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
<?xml-stylesheet href="rss.xsl" type="text/xsl" media="screen"?>
|
|
<rss version="2.0">
|
|
<channel>
|
|
<title><?php echo $short_blog_title; ?></title>
|
|
<link><?php echo $root; ?>/rss.php</link>
|
|
<description><?php $blog_title; ?></description>
|
|
<?php
|
|
require "creds.php";
|
|
|
|
$result = mysqli_query($mysqli, "SELECT ID, Title, Mood, Song, UNIX_TIMESTAMP(Time), Message FROM articles ORDER BY ID DESC");
|
|
|
|
while($res = mysqli_fetch_array($result)) {
|
|
echo " <item>\n";
|
|
echo " <title>".$res['Title']."</title>\n";
|
|
echo " <pubDate>".date('r', $res["UNIX_TIMESTAMP(Time)"])."</pubDate>\n";
|
|
echo " <link>".$root."/#".$res['ID']."</link>\n";
|
|
echo " <guid>".$root."/#".$res['ID']."</guid>\n";
|
|
echo " <description>\n";
|
|
echo " current mood: ".$res['Mood']." - current tunes: ".$res['Song'];
|
|
echo "\n </description>\n";
|
|
echo " </item>\n";
|
|
}
|
|
?>
|
|
</channel>
|
|
</rss>
|