Merge pull request #87 from nodiscc/patch-1
rss: declare UTF-8 charset, xml content-type, add guid elements
This commit is contained in:
commit
5d295b0ac1
1 changed files with 3 additions and 0 deletions
3
rss.php
3
rss.php
|
@ -152,7 +152,9 @@ if (is_writeable(".")) {
|
|||
/*===================*/
|
||||
/* XML Gen */
|
||||
/*===================*/
|
||||
header('Content-Type: text/xml');
|
||||
$temp = explode("\n", $content);
|
||||
echo "<?xml version='1.0' encoding='UTF-8 '?>\n";
|
||||
echo "<rss version='2.0'>\n<channel>";
|
||||
echo "<title>$title</title>";
|
||||
echo "<link>$gallery_link</link>";
|
||||
|
@ -163,6 +165,7 @@ for ($i=0; $i < $nb_items_rss && $i < count($temp); $i++) {
|
|||
echo "<item>\n";
|
||||
echo " <title>" . basename($temp[$i]) . "</title>\n";
|
||||
echo " <link>". $temp[$i] . "</link>\n";
|
||||
echo " <guid>". $temp[$i] . "</guid>\n";
|
||||
echo " <description><![CDATA[ <img src='" . $temp[$i] . "'> ]]></description>\n";
|
||||
echo "</item>\n";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue