Hallo, ik heb een feed gemaakt voor mijn site maar ik zal graag een image voor iedere item toevoegen, helaas kan ik niets vinden hoe ik dat moet doen. Hierbij de script die ik gebruik tot zover. alvast bedankt voor jullir hulp.
<?php
............
mysql_connect($host,$username,$password);
mysql_select_db($db);
$query=mysql_query("SELECT * FROM liste ORDER BY ID DESC LIMIT 0,25");
while($row=mysql_fetch_assoc($query))
{
echo(" <item>\n");
@ceasar
ik heb een rss feed gemaakt d.m.v. php (zie stukeje script boven). Zodra dat ik iets nieuws in mijn database zet komt het iautomatisch in mijn rss. wat ik zou wil is dat er afbeelding ook bij kunnen. het lukt mij dus niet om naast de tekst een image te plaatsen en dat wil doen d.m.v. php.
Het lukt mij ook handmatig met een xml pagina maar ik wil het met PHP doen zodat alees automatisch gaat.
?
Onbekende gebruiker
10-09-2008 00:39
Zie ook de source:
<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>Latest Movie Trailers</title>
<link>http://www.apple.com/trailers/</link>
<description>Recently added Movie Trailers.</description>
<language>en-US</language>
<lastBuildDate>Fri, 05 Sep 2008 17:36:44 PST</lastBuildDate>
<generator>Custom</generator>
<copyright>2008 Apple Inc.</copyright>
<item>
<title>Madagascar 2 - Trailer 2</title>
<link>http://www.apple.com/trailers/dreamworks/madagascar2/</link>
<description>In the highly-anticipated sequel to &#x201C;Madagascar,&#x201D; Alex, Marty, Melman, Gloria, King Julien, Maurice and the penguins and the chimps find themselves marooned on the distant shores of Madagascar. In the face of this obstacle, the New Yorkers have hatched a plan so crazy it just might work. With military precision, the penguins have repaired an old crashed plane&#x2014;sort of. Once aloft, this unlikely crew stays airborne just long enough to make it to the wildest place of all&#x2014;the vast plains of Africa, where the members of our zoo-raised crew encounter species of their own kind for the very first time. Africa seems like a great place&#x2026;but is it better than their Central Park home?</description>
<pubDate>Fri, 05 Sep 2008 00:00:00 PST</pubDate>
<content:encoded><![CDATA[<table><tr valign="top"><td width="67"><a href="http://www.apple.com/trailers/dreamworks/madagascar2/"><img src="http://images.apple.com/moviesxml/s/dreamworks/posters/madagascar2_m200808081754.jpg" width="65" height="97" border="0"></a></td><td> </td><td><a href="http://www.apple.com/trailers/dreamworks/madagascar2/"><span style="font-size: 16px; font-weight: 900; text-decoration: underline;">Madagascar 2 - Trailer 2</span></a><br /><span style="font-size: 12px;">In the highly-anticipated sequel to “Madagascar,” Alex, Marty, Melman, Gloria, King Julien, Maurice and the penguins and the chimps find themselves marooned on the distant shores of Madagascar. In the face of this obstacle, the New Yorkers have hatched a plan so crazy it just might work. With military precision, the penguins have repaired an old crashed plane—sort of. Once aloft, this unlikely crew stays airborne just long enough to make it to the wildest place of all—the vast plains of Africa, where the members of our zoo-raised crew encounter species of their own kind for the very first time. Africa seems like a great place…but is it better than their Central Park home?<br /><b>Directed by:</b> Eric Darnell, Tom McGrath<br /><b>Starring:</b> Ben Stiller, Chris Rock, David Schwimmer, Jada Pinkett Smith, Sacha Baron Cohen</span></td></tr></table>]]></content:encoded>
</item>
</channel>
</rss>