créer un flux rss avec php

J'ai pas la réponse mais à ta place je telechargerais l'archive de dotclear (moteur de blog), ils ont un script php qui génére des flux RSS (que j'utilise mais que dont je ne pourrais pas expliquer le fonctionnement)
 
ca donne qqchose comme ca
<?php
# ***** BEGIN LICENSE BLOCK *****
# This file is part of DotClear.
# Copyright (c) 2004 Olivier Meunier and contributors. All rights
# reserved.
#
# DotClear is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# DotClear is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DotClear; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ***** END LICENSE BLOCK *****
require dirname(__FILE__).'/inc/prepend.php';
require dirname(__FILE__).'/layout/lib.cache.php';

require dirname(__FILE__).'/layout/class.xblog.php';
require dirname(__FILE__).'/layout/class.xblogpost.php';
require dirname(__FILE__).'/layout/class.xblogcomment.php';

$type = (!empty($_GET['type']) && $_GET['type'] == 'co') ? 'co' : 'blog';
$cat = (!empty($_GET['cat'])) ? $_GET['cat'] : '';
$lang = (!empty($_GET['lang'])) ? $_GET['lang'] : '';

# Connexion MySQL
$con = new Connection(DB_USER,DB_PASS,DB_HOST,DB_DBASE);

if ($con->error()) { exit; }

# Création de l'objet de type weblog avec uniquement les billets
# publiés
$blog = new xblog($con,DB_PREFIX,1,dc_encoding);
$blog->rs_blogpost = 'xblogpost';
$blog->rs_blogcomment = 'xblogcomment';

$blog->setURL('post','http://'.$_SERVER['HTTP_HOST'].dc_blog_url.dc_format_post_url);

# Si type = co on fait un fil des commentaires
if ($type == 'co')
{
if (!empty($_GET['post'])) {
$comments = $blog->getComments($_GET['post'],'DESC');
} else {
$comments = $blog->getComments('','DESC',20);
}

$title = dc_blog_name.' - Commentaires';
$ts = time();
$items = $seq = '';

if (!$comments->isEmpty())
{
$ts = $comments->getTS();

while(!$comments->EOF())
{
$seq .= $comments->getRSSSeq();
$items .= $comments->getRSSItem(dc_short_feeds);

$comments->moveNext();
}
}
}
else
{
# Dernières nouvelles
$news = $blog->getLastNews(10,$cat,'post_dt DESC',false,$lang);

$ts = strtotime($blog->getEarlierDate());
$title = dc_blog_name;

$items = $seq = '';
while(!$news->EOF())
{
$items .= $news->getRSSItem(dc_short_feeds);
$seq .= $news->getRSSSeq();

$news->moveNext();
}
}

# Fermeture de connexion
$con->close();

# Cache HTTP
if (dc_http_cache && defined('DC_UPDATE_FILE_W') && DC_UPDATE_FILE_W)
{
$mod_files = get_included_files();
$mod_files[] = DC_UPDATE_FILE;
$mod_files[] = dirname(__FILE__).'/conf/dotclear.ini';

cache::http($mod_files);
}

header('Content-Type: text/xml; charset='.dc_encoding);
echo '<?xml version="1.0" encoding="'.dc_encoding.'" ?>'."\n";
?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns="http://purl.org/rss/1.0/">

<channel rdf:about="<?php echo 'http://'.$_SERVER['HTTP_HOST'].dc_blog_url; ?>">
<title><?php echo $blog->toXML($title); ?></title>
<description><![CDATA[<?php echo dc_blog_desc; ?>]]></description>
<link><?php echo 'http://'.$_SERVER['HTTP_HOST'].dc_blog_url; ?></link>
<dc:language><?php echo DC_LANG; ?></dc:language>
<dc:creator></dc:creator>
<dc:rights></dc:rights>
<dc:date><?php echo dt::iso8601($ts); ?></dc:date>
<admin:generatorAgent rdf:resource="http://www.dotclear.net/" />

<sy:updatePeriod>daily</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<sy:updateBase><?php echo dt::iso8601($ts); ?></sy:updateBase>

<items>
<rdf:Seq>
<?php echo $seq; ?>
</rdf:Seq>
</items>
</channel>

<?php echo $items; ?>

</rdf:RDF>
 
personne ne peut m'aider ??? :(

En fait, aucune balise html n'est prise en compte, c'est même pire, puisque tout ce qui se trouve entre des balises n'est pas affiché...

par exemple :
Le feed RSS du site arrive enfin !!<br />
<br />
J'y suis arrivé grâce à un script fourni sur <a href="lien.php?lien=http://www.asp-php.net/&from=b&nom=ASP-PHP" title="ASP-PHP">ASP-PHP</a> <img src="images/smilies/rateau.gif" alt="smiley" class="smiley" /><br />
<br />
Je promet rien, mais je vais essayer de pondre un widget pour lire le feed rss du site <img src="images/smilies/sourire.gif" alt="smiley" class="smiley" /><br />
<br />
Voilà !
deviens dans le feed rss :
Le feed RSS du site arrive enfin !!J'y suis arrivé grâce à un script fourni sur Je promet rien, mais je vais essayer de pondre un widget pour lire le feed rss du site Voilà !
 
Essai comme ceci:
Bloc de code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
  <title>Intranet Feed RSS</title> 
  <link>http://000.000.000.000</link> 
  <description>Le flux RSS du site</description> 
  <language>fr</language> 
  <copyright>Creer par Mac-Andre</copyright> 
  <pubdate>Tue, 20 Dec 2005 8:37:05 +0100</pubdate> 
  
  <item>
  <title>Premier feed RSS de l'intranet</title> 
  <link>http://000.000.000.000/feedrss.xml</link>
  <description>Il s'agit de la premiere depeche de ce site</description> 
  <image> 
  	<title>titre de l'image (équivalent du alt)</title> 
  	<url>chemin absolu de l'image http://.... (pas plus de 88px de haut)</url> 
  	<link>http://  lien appelé quand on clique sur l'image</link> 
  </image>
  </item>
  
  
  
</channel>
</rss>

;)

Marc-André
 
Désolé, je peux pas t'aider pour ca, mais avec RSSOwl par exemple (lecteur RSS), les images passent (cf le flux RSS des widgets Konfabulator).

Peut etre qu'en aspirant leur site, tu verrais comment ils font ?