\n";
$xml .= "\n";
$xml .= "\n";
$xml .= "\n";
$xml .= "" . $config['accro'] . " Releases\n";
$xml .= "" . $config['path'] . "\n";
$xml .= "Latest " . $config['accro'] . " Releases\n";
$xml .= " " . $config['team'] . " 2009\n";
$xml .= "en\n";
$xml .= "\n";
$xml .= " " . $config['accro'] . " Releases\n";
$xml .= "" . $config['path'] . "design/rss.png\n";
$xml .= "" . $config['path'] . "\n";
$xml .= "\n";
$today = date("D, d M Y H:i:s +0100");
//date du jour d'execution du fichier PHP
$xml .= "" . $today . "\n";
// Faîtes appel à vos fichier de connection à votre base de donnée MySQL
// Adaptez ces lignes à votre base de données / noms de table
$resultat_requete = mysql_query("SELECT * FROM releases ORDER BY date DESC limit 0, 10");
// extraction des 10 dernières releases
while ($lig = @mysql_fetch_assoc($resultat_requete))
{
$titre = $lig["name"];
$adresse = $lig["url"];
$date = $lig["date"];
$datephp = date("D, d M Y H:i:s +0100", $date);
$xml .= "- \n";
$xml .= "" . $titre . "\n";
$xml .= "" . $config['path'] . "\n";
$xml .= "" . $datephp . "\n";
$xml .= "Visit our distro to download\n";
$xml .= "
\n";
} //fin du while
$xml .= "\n";
$xml .= "\n";
$fp = fopen("rss.xml", 'w+');
fputs($fp, $xml);
fclose($fp);
echo '
RSS Updated !
Saw the file
';
?>