<?
ob_start();

header("Content-Type: text/xml");
header("Pragma: no-cache"); 

echo '<?xml version="1.0" encoding="UTF-8" ?>
			<rss version="2.0">
			<channel>
			<title>Treinreizigers</title>
			<link>http://www.ovontmoeting.nl</link>
			<description>OV Ontmoetingen</description>
			<language>nl-nl</language>
			<copyright>Accret.nl</copyright>
			<managingEditor>info@treinreizigers.nl (OvOntmoeting.nl)</managingEditor>
			<ttl>60</ttl>
			<image>
			 	<url>http://www.ovontmoeting.nl/design/rsstitel.png</url>
			 	<link>http://www.ovontmoeting.nl</link>
			 	<title>Bekijk alle oproepen op ovontmoeting.nl!</title>
			</image>						
';
 
include('includes/db.php');			
$query = 'select oid,titel,tekst,opzoek,soort from oproep where status = 1 order by oid desc limit 0,10';
$sql = mysql_query($query);
while ($feed = mysql_fetch_array($sql)) {
			
			if ($feed[titel] == '') { 
				$titel = 'OV Ontmoeting';				
			} else {
				$titel = $feed[titel];
			}
			
			$titel = "#treinontmoeting";
			
			if ($feed[soort] == 0) {
				$tekst = $feed[tekst];
			} else {
				$tekst = $feed[opzoek];
			}
						
			echo ' 
				<item>
				<guid>http://www.ovontmoeting.nl/ovontmoetingen_'.$feed[oid].'.html</guid>
  			<title>'.$titel.'</title>
  			<link>http://www.ovontmoeting.nl/ovontmoetingen_'.$feed[oid].'.html</link>
  			<description>             
				'.$tekst.' Bron: http://ovOntmoeting.nl
				</description>  		
				</item>' ;
}

echo ' 
	</channel>
	</rss>
' ;

ob_end_flush();
?>
