<?php header("Content-type: text/xml") ?>
<?php header("Last-modified: ".gmdate("D, d M Y H:i:s",mktime(0,0,0))." GMT") ?>
<rss version="2.0">
  <channel>
    <title>the spongy animal of the day</title>
    <link>http://www.tartarus.org/~gareth/stuff/spongy/</link>
    <description>spongy</description>
    <item>
<?php
$name[0]="a Fish"; $text[0]="&amp;quot;Bob bob bob&amp;quot; - the wise words of the Spongy Fish.";
$name[1]="a Pig"; $text[1]="Oink. Snurfle. Snurfle.";
$name[2]="a Frog"; $text[2]="The Spongy Frog bounces.";
$name[3]="an Elephant"; $text[3]="A long trunk and sturdy legs await you today.";
$name[4]="a Sheep"; $text[4]="Today will be fluffy.";
$name[5]="a Duck"; $text[5]="Quack! Quack! Bear that in mind.";
srand(date("Ymd"));
$a=rand(0,5);
list(,$file) = explode(' ',$name[$a]);
?>
      <pubDate><?php echo date("r", mktime(0, 0, 0)) ?></pubDate>
      <title>
        <?php echo strftime("%A, %e %B %Y");?> :
        the Virtual Spongy Animal of the Day is <?php echo $name[$a]; ?>!
      </title>
      <guid isPermaLink="false">
        spongy animal of <?php echo date("Y-m-d") ?>
      </guid>
      <description>
         &lt;center&gt;
         &lt;img src="http://www.tartarus.org/~gareth/stuff/spongy/<?php echo $file; ?>.jpg"
                 alt="[ <?php echo $file; ?>.jpg ]"&gt;
         &lt;br&gt;&lt;br&gt;&lt;br&gt;
         <?php echo $text[$a]; ?>&lt;/center&gt;&lt;br&gt;
      </description>
    </item>
  </channel>
</rss>
