12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- require_once 'user/config.php';
- $page_name=$meta_description;
-
-
- session_start();
-
- $sql1="SELECT * FROM blog_config";
- $bloginfo_rss_req = $dbh->query($sql1) or die('Erreur SQL !<br />'.$sql1.'<br />'.mysql_error());
- $bloginfo_rss = $bloginfo_rss_req->fetch(PDO::FETCH_ASSOC);
-
- echo "<?xml version='1.0' encoding='ISO-8859-1'?>
- <rss version='2.0'>
- <channel>
- <title>".$site_name."</title>
- <link>http://www.monsite.com</link>
- <description>{$bloginfo_rss["description"]}</description>";
- $sql_rss="SELECT * FROM article ORDER BY id_article DESC LIMIT 20";
- $req_rss = $dbh->query($sql_rss) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
- while($data_rss=$req_rss->fetch(PDO::FETCH_ASSOC))
-
- {
- $titre_article_rss=stripslashes($data_rss["titre"]);
- $article_desc=strip_tags($data_rss['article']);
- $description_rss=stripslashes($article_desc);
-
- //$article_desc = strip_tags($data_rss['article']);
-
- //
- //echo"{$data["titre"]}<///a><br />";
- //echo"<b>".$article_date_display." :</b> {$data["date"]}<br />";
- echo"
- <item>
- <title>{$titre_article_rss}</title>
- <link>{$root_path}?id={$data_rss["id_article"]}</link>
- <guid isPermaLink='false'>6</guid>
- <description>{$description_rss}</description>
- <pubDate>0000-00-00 00:00:00 GMT</pubDate>
- </item>";
- }
- echo"
- </channel>
- </rss>";
-
- ?>
|