Skip to content

Commit 5d295b0

Browse files
committed
Merge pull request #87 from nodiscc/patch-1
rss: declare UTF-8 charset, xml content-type, add guid elements
2 parents c5a239a + 61fbcb2 commit 5d295b0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

rss.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ function print_array($array_to_display)
152152
/*===================*/
153153
/* XML Gen */
154154
/*===================*/
155+
header('Content-Type: text/xml');
155156
$temp = explode("\n", $content);
157+
echo "<?xml version='1.0' encoding='UTF-8 '?>\n";
156158
echo "<rss version='2.0'>\n<channel>";
157159
echo "<title>$title</title>";
158160
echo "<link>$gallery_link</link>";
@@ -163,6 +165,7 @@ function print_array($array_to_display)
163165
echo "<item>\n";
164166
echo " <title>" . basename($temp[$i]) . "</title>\n";
165167
echo " <link>". $temp[$i] . "</link>\n";
168+
echo " <guid>". $temp[$i] . "</guid>\n";
166169
echo " <description><![CDATA[ <img src='" . $temp[$i] . "'> ]]></description>\n";
167170
echo "</item>\n";
168171
}

0 commit comments

Comments
 (0)