<?php //Indicamos que el contenido es XML 
header("Content-Type: application/xml");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
?><?php echo '<?xml version="1.0" encoding="UTF-8"?>';

include 'concha.php'; include 'url_amigable.php';?>
 
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title><![CDATA[<?php echo $nombresitio ?>]]></title>
<link><?php echo $dom ?></link>
<description><![CDATA[<?php echo $nombresitio ?>]]></description>

<language><![CDATA[es]]></language>

<copyright><![CDATA[Copyright 2018 <?php echo $dom ?> - All rights reserved]]></copyright>

<ttl><![CDATA[10]]></ttl>

<image><url><?php echo $logo_C ?></url>
<title><![CDATA[<?php echo $nombresitio ?>]]></title>
<link><?php echo $dom ?></link></image>

<?php 


mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");
$sql = "SELECT * FROM notas WHERE ver = 'si' ORDER BY ID desc LIMIT 30";
$consulta = mysql_query ($sql);
while ($row = mysql_fetch_array($consulta))
{


$ID = $row["ID"];
$titulo = $row["titulo"];
$texto = $row["texto"];
$bajada = $row["bajada"];
$d = $row["d"];
$m = $row["m"];
$a = $row["a"];
$carpetafoto = $row["carpetafoto"];
$tag1 = $row["tag1"];
$tag2 = $row["tag2"];
$tag3 = $row["tag3"];
$tag4 = $row["tag4"];
$tag5 = $row["tag5"];
$foto = $row["foto"];
$ext_img = $row["ext_img"];
$texto_sin_html = strip_tags($texto);
if ($ext_img == NULL) {$ext_img = ".jpg";};

$bajada = strip_tags($bajada);
$bajada = html_entity_decode($bajada);
?> 
<item>
<title><![CDATA[<?php echo $titulo ?>]]></title>
<link><? echo $dom;?>/nota/<?php echo $ID ?>/<?php echo urls_amigables($titulo) ?></link>

<description><?php echo $bajada ?></description>
<dc:creator><![CDATA[<?php echo $nombresitio ?>]]></dc:creator>
<?php /* 
<enclosure url="<?php echo $dom ?>/<?php echo $carpetafoto ?>/thumbnail_<?php echo $foto ?><?php echo $ext_img ?>" lenght="51265" type="image/jpg" />

 */?>
 <guid isPermaLink="false">
      <? echo $dom;?>/nota/<?php echo $ID ?>/<?php echo urls_amigables($titulo) ?></guid>
     
     <dc:language>es</dc:language>
     <dc:format>text/html</dc:format>
     
<enclosure url="<? echo $dom;?>/<?php echo $carpetafoto ?>/resize_<?php echo $foto ?><?php echo $ext_img ?>" length="0" type="image/jpg"/>
      
      
</item>


<?php


 }
mysql_free_result($consulta);

?></channel>
</rss>