Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/02/2010, 19:25
caca1
(Desactivado)
 
Fecha de Ingreso: febrero-2010
Mensajes: 42
Antigüedad: 14 años, 2 meses
Puntos: 1
sitemap en php

E creado un sitemap en php y base de datos, funciona perfectamente no hay ningún error en php mi problema es que por alguna extraña razón cuando le envio a google mi sitemap me da error, mi archivo se encuentra con extencion php,

Sitemap.php Pero google no lo acepto, después con htaccess cambie la extensión a sitemap.xml pero google tampoco lo quiso, ¿Qué puedo hacer?

Aqui esta el codigo que utilizo:



Código PHP:
<?php
include('conexion.php');
echo 
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<urlset
      xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"
      xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
      xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9
            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\">
"
;
echo 
"<url><loc>$web</loc></url>\n";


$query_usuariosmysql_query("SELECT *FROM $table_usuarios order by id DESC");
while(
$usermysql_fetch_array($query_usuarios))
{echo 
"<url><loc>$web/$user[nombre].html</loc></url>\n";}

$query_preguntasmysql_query("SELECT *FROM $table_preguntas order by id DESC");
while(
$id_preguntasmysql_fetch_array($query_preguntas))
{echo 
"<url><loc>$web/Pregunta$id_preguntas[id]/</loc></url>\n";}

$query_tutorialmysql_query("SELECT *FROM $table_tutorial order by id DESC");
while(
$id_tutorialmysql_fetch_array($query_tutorial))
{echo 
"<url><loc>$web/tutorial/$id_tutorial[tipo]/$id_tutorial[id]/</loc></url>\n";}

echo 
"</urlset>";
?>