<?xml version="1.0" encoding="utf-8"?>

<?php echo"<rss version=\"2.0\">
    <channel>
        <title>Monardex: Business platform</title>
        <link>http://www.monardex.com</link>
        <description>Business platform environment and health</description>
        <managingEditor>g.glineur@monardex.com</managingEditor>
        <webMaster>webmaster@monardex.com</webMaster>";
        
require ("../private_html/db-connex-monard.php");

function cleanText($intext) {
    return utf8_encode(htmlspecialchars(stripslashes($intext)));
}
        

$link = mysql_connect ($host,$user,$pass) or die ('Erreur : '.mysql_error() );
mysql_select_db($db) or die ('Erreur :'.mysql_error());


$sql="SELECT * FROM articles";
$result = mysql_query($sql);       

for ($i = 0; $i < 10 ; $i++) 

{
    @$row = mysql_fetch_array($result);
    $title             = cleanText($row["title"]);
    $texte             = cleanText($row["article"]); 
    $link             = "http://www.monardex.com/annonces.php?id=".$row["article_id"];
    $description     = cleanText($row["langue"]);
    


        echo"<item>
            <title>$title</title>
            <text>$texte</text>
            <link>$link</link>
            <description>$description</description>
        </item>";

}


       echo"</channel>
</rss>"

?>
