<? header('Content-type: text/xml'); ?>
<rss version="2.0">
<?php include "inc/top-header.php";?>
<channel>
<title>Pest Control in <?=$state;?></title>
<description><?=$company;?> is the Authorized Basement Systems Dealer in <?=$state;?></description>
<link>http://www.pestcontrolindiana.com</link>
<copyright><?=$company;?></copyright>
<?php
include "/home/config/config_bs.php";	  
$q="SELECT title, preview, post FROM dealer_blog WHERE (dealer_id = '$dealer_id') AND (validate = '1') ORDER BY blog_id DESC LIMIT 10";
$doGet=mysql_query($q);
?>
<?php
while($result = mysql_fetch_array($doGet)){
$title2 = str_replace(" ", "-", "{$result['title']}");
?>
     <item>
        <title> <?=htmlentities(strip_tags($result['title'])); ?></title>
        <description> <?=htmlspecialchars($result['post']);?></description>
        <link>http://pestcontrolindiana.com/blog.php?post=<?=$title2;?></link>
     </item>  
<? } ?> 
</channel>
</rss>
