Her er kilde-koden:
<?php require_once('Connections/cliche.php'); ?>
<?php
mysql_select_db($database_cliche, $cliche);
$query_rss = "SELECT * FROM photo ORDER BY `date` DESC";
$rss = mysql_query($query_rss, $cliche) or die(mysql_error());
$row_rss = mysql_fetch_assoc($rss);
$totalRows_rss = mysql_num_rows($rss);
// ##########################################################################################//
// RSS 2.0 FEED
// ##########################################################################################//
$output = "<?xml version='1.0' encoding='ISO-8859-1'?>
<rss version=\"2.0\">
<channel>
<title>Leander Joergensen Photographer</title>
<link>leanderj.dk</link>
<description>new picture</description>
";
do {
$output .=" <item>
<title>".$row_rss['title']."</title>
<link>
www.leanderj.dk</link> <description>New picture uploaded</description>
<pubDate>".$row_rss['date']."</pubDate>
</item>
";
} while ($row_rss = mysql_fetch_assoc($rss));
$output .= "
</channel>
</rss>";
header("Content-type:application/xml");
echo $output;
exit;
?>
<?php
mysql_free_result($rss);
?>