J'ai un fichier rss.php composé de la sorte :
<?
header("Content-Type: text/xml; charset=\"iso-8859-1\"");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
include("config/conf.php");
$act = $_GET['act'];
?>
<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>
<title>Pcshows : les news, les articles et le forum</title>
<link><? echo $url; ?></link>
<description>Site de tunning PC, overclocking, watercooling, tests ...</description>
<managingeditor><? echo $email_admin; ?></managingeditor>
<webmaster><? echo $email_admin; ?></webmaster>
<language>fr</language>
<lastbuilddate><?=date('r')?></lastbuilddate>
<?
if ($act == "forum") {
// Forum
$requete = mysql_query("SELECT * FROM phpbb_forums",$connexion);
$nombre_forum = mysql_num_rows($requete);
$k = 0;
while ($k<$nombre_forum)
{
$lastpost = mysql_result($requete,$k,"forum_last_post_id");
// Vérification id != 0
if ($lastpost != 0) {
// Dernier post
$requete_post = mysql_query("SELECT * FROM phpbb_posts_text WHERE post_id=\"".$lastpost."\"",$connexion);
$tableau = mysql_fetch_array($requete_post, MYSQL_ASSOC);
$idpost = $tableau['post_id'];
$sujet = $tableau['post_subject'];
$texte = $tableau['post_text'];
// Topic
$requete_topic = mysql_query("SELECT * FROM phpbb_topics WHERE topic_first_post_id=\"".$idpost."\"",$connexion);
$tableau2 = mysql_fetch_array($requete_topic, MYSQL_ASSOC);
$idtopic = $tableau2['topic_id'];
// Affichage flux ...
echo('<item>
<title>'.$sujet.'</title>
<link>'.$url.'/forum/viewtopic.php?t='.$idtopic.'</link>
<description>'.$texte.'</description>
</item>');
}
$k++;
}
}
if ($act == "news") {
// Requête
$requete = mysql_query("SELECT * FROM news WHERE valider=\"1\" ORDER BY id DESC LIMIT 0, 10",$connexion) or die ("Requête invalide") ;
$resultat = mysql_num_rows($requete);
$i = 0;
while ($i<$resultat)
{
$id = mysql_result($requete,$i,"id");
$titre = mysql_result($requete,$i,"titre");
?>
<item>
<title><? echo html_entity_decode($titre, ENT_QUOTES); ?></title>
<link><? echo $url; ?>/site/onenews.php?id=<? echo $id; ?></link>
</item>
<?
$i++;
}
}
if ($act == "articles") {
$j = 1;
while ($j<7)
{
$categ = mysql_query("SELECT * FROM article WHERE valider=\"1\" AND categorie=\"".$j."\" ORDER BY id DESC LIMIT 1",$connexion);
// Vérification présence d'un article dans la catégorie
if (mysql_num_rows($categ) != 0) {
$tableau_categ = mysql_fetch_array($categ, MYSQL_ASSOC);
$id = $tableau_categ['id'];
$titre = $tableau_categ['titre'];
?>
<item>
<title><? echo html_entity_decode($titre, ENT_QUOTES); ?></title>
<link><?=$url?>/site/ article.php?id=<?=$id?>&categorie=<?=$j?>&page=1</link>
</item>
<?
}
$j++;
}
}
mysql_close($connexion);
?>
</channel>
</rdf:RDF>
Il permet de construire 3 fichiers XML RSS différents à partir du même fichier PHP

Il suffit de renseigner la variable dans l'url
Donc non il n'est pas sauvegardé mais généré dynamiquement, plus rapide et moins de ressources
Sinon, j'ai essayé ton code et y a une erreur : voir mon edit dans le post précédent
