<?    header('Content-type: text/xml');

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

<rss version="2.0"> <channel>
    <title>Sneakerstore Sneakers</title> 
    <link>http://www.sneakerstore.nl/</link> 
    <description>Houd jouw op de hoogte van de nieuwe sneakers op sneakerstore.nl!</description>
<?
	mysql_connect("localhost","root","EPy8vetcuaT5cR25t") or die(mysql_error());
mysql_select_db("db_sneakerstore") or die(mysql_error());	
			  $sql3 = "select *  from feed  ORDER by id DESC LIMIT 20"; 

$result3 = mysql_query($sql3); 

while ($row3 = mysql_fetch_array($result3)) { 

 $idtopic      = $row3["id"];
 $catid      = $row3["catid"];
 
 
 $products      = $row3["products"];
 
 
 $text      = $row3["text"];
  $datum      = $row3["datum"];
    $tijd      = $row3["tijd"];
 $text=nl2br($text); 
         $text =  str_replace("[youtube]", " ", $text);
		    $text =  str_replace("[/youtube]", " ", $text);
		 	    $text =  str_replace('"', "", $text);
				   $text =  str_replace("'", "", $text);
				   
				   	   $text =  str_replace("�", "", $text);
					   	   	   $text =  str_replace("�", "", $text);
					   	   $text =  str_replace("�", "", $text);
					  $text =  str_replace("\n", "", $text);	
					  	  $text =  str_replace("\r\n", "", $text);	
						  $text =  str_replace("\r", "", $text);
	$text =  str_replace("<br />", "", $text);	
						$text =  str_replace("�", "", $text);
								$text =  str_replace("�", "", $text);
					$text =  htmlentities($text);
					
					$text = strip_tags(html_entity_decode($text));
 $text = preg_replace("/^[^a-z0-9]?(.*?)[^a-z0-9]?$/i", "$1", $text); 
 $text =  preg_replace('~&([a-z]{1,2})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities($text, ENT_QUOTES, 'UTF-8'));

 ?><item><?
 
 	  $sqlproducts = "SELECT * FROM producten where productid = '$products' LIMIT 0 , 1"; 

	  $queryp = mysql_query($sqlproducts); 
while ($pr = mysql_fetch_array($queryp)) { 

  $naam      = $pr["naam"];
 
   $naam      = trim("$naam");
   
      $name      = $naam;
 $fabrikant      = $pr["fabrikant"];
 $currentomschrijving      = $pr["omschrijving"];
 $currentomschrijving = strip_tags($currentomschrijving);
}
?>
 <title><? echo $fabrikant; echo " "; echo $naam;?></title> 
 
 
   <pubDate><? $datum = strtotime($datum); echo date("D, d M Y", $datum);  echo date(" H:i:s ", $datum); echo "GMT";?></pubDate>
      <link>http://www.sneakerstore.nl/<? echo "$fabrikant"; echo "_"; $naam2 = trim("$naam");    $naam2 = str_replace(" ", "_", $naam2);  echo $naam2; echo "-";    $id = str_replace(" ", "%20", $products);  echo $id;?>.html</link> 
      <description><?



	 echo "De $fabrikant $naam. ";
	 echo $currentomschrijving;


	  echo $text;

	  
	  ?></description> 
    </item>

<?

}
?>
  </channel>
</rss>
