CMS ultra léger au style oldschool, projet de la communauté Kalaïn Hundin.

rss.php 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. require_once 'user/config.php';
  3. $page_name=$meta_description;
  4. session_start();
  5. $sql1="SELECT * FROM blog_config";
  6. $bloginfo_rss_req = mysql_query($sql1) or die('Erreur SQL !<br />'.$sql1.'<br />'.mysql_error());
  7. $bloginfo_rss = mysql_fetch_assoc($bloginfo_rss_req);
  8. echo "<?xml version='1.0' encoding='ISO-8859-1'?>
  9. <rss version='2.0'>
  10. <channel>
  11. <title>".$site_name."</title>
  12. <link>http://www.monsite.com</link>
  13. <description>{$bloginfo_rss["description"]}</description>";
  14. $sql="SELECT * FROM article ORDER BY id_article DESC LIMIT 20";
  15. $req = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
  16. while($data=mysql_fetch_assoc($req))
  17. {
  18. $article_desc = strip_tags($data['article']);
  19. //
  20. //echo"{$data["titre"]}<///a><br />";
  21. //echo"<b>".$article_date_display." :</b> {$data["date"]}<br />";
  22. echo"
  23. <item>
  24. <title>{$data["titre"]}</title>
  25. <link>http://www.blogartisanal.tk/?id={$data["id_article"]}</link>
  26. <guid isPermaLink='false'>6</guid>
  27. <description>{$article_desc}</description>
  28. <pubDate>0000-00-00 00:00:00 GMT</pubDate>
  29. </item>";
  30. }
  31. echo"
  32. </channel>
  33. </rss>";
  34. ?>