I'm making my own RSS feed in PHP for my website, which loads the blog my website has from a table called 'blog', it all works as it should except for one thing...no images are showing up at the articles. Here's the output piece of my code:
while($data = mysql_fetch_assoc($news))
{
echo "<item>" . chr(10);
echo "<title>[$data[type]] $data[name]</title>" . chr(10);
echo "<author>Johannes Jensen</author>" . chr(10);
echo "<link>http://www.funbyjohn.com/v2/?blog=$data[url]</link>" . chr(10);
echo "<image>" . chr(10);
if($data["type"] == "text")
{
$imageurl = "http://www.funbyjohn.com/v2/gfx/mini_me.png";
} else
{
$imageurl = "http://www.funbyjohn.com/v2/media/thumb-$data[date].png";
}
echo "<src>$imageurl</src>" . chr(10);
echo "<title>$data[name]</title>" . chr(10);
echo "<link>http://www.funbyjohn.com/v2/?blog=$data[url]</link>" . chr(10);
echo "</image>" . chr(10);
if($data["type"] == "text")
{
$content = $data["content"];
} else
{
$content = $data["label_info"];
}
echo "<description>" . strip_tags(preg_replace("/\n+/", " ", $content)) . "</description>" . chr(10);
echo "<pubDate>" . date("D, j M Y H:i:s", $data["date"]) . " GMT</pubDate>" . chr(10);
echo "</item>" . chr(10);
}
And here's an example of the output of an article
<item>
<title>[image] Here's a new screenshot from Go Sheep!</title>
<author>Johannes Jensen</author>
<link>http://www.funbyjohn.com/v2/?blog=heres-a-new-screenshot-from-go-sheep</link>
<image>
<src>http://www.funbyjohn.com/v2/media/thumb-1277466055.png</src>
<title>Here's a new screenshot from Go Sheep!</title>
<link>http://www.funbyjohn.com/v2/?blog=heres-a-new-screenshot-from-go-sheep</link>
</image>
<description>*article goes here*</description>
<pubDate>Fri, 25 Jun 2010 06:40:55 GMT</pubDate>
</item>
Am I doing something wrong? Please help.
And here's my RSS feed for anyone that's interested:
http://www.funbyjohn.com/v2/rss.php