'."\n"; echo ''."\n"; //Principales ---------------------------------------------- genURL('https://'.$_SERVER['HTTP_HOST'].'/',$fechaModificacion,'daily','1'); genURL('https://'.$_SERVER['HTTP_HOST'].'/'.'contacto',$fechaModificacion,'daily','0.5'); genURL('https://'.$_SERVER['HTTP_HOST'].'/'.'lista-precios',$fechaModificacion,'daily','1'); genURL('https://'.$_SERVER['HTTP_HOST'].'/'.'mapa-del-sitio',$fechaModificacion,'daily','0.5'); //Categorias ----------------------------------------------- $pSql = "select catLink from categorias order by catId"; $result=mysqli_query($link,$pSql) or die(mysqli_error($link)); while($row = mysqli_fetch_array($result)) { genURL('https://'.$_SERVER['HTTP_HOST'].'/'.$row["catLink"],$fechaModificacion,'daily','0.5'); } //Productos ------------------------------------------------ $pSql = "select prdPagina from productos order by prdId"; $result=mysqli_query($link,$pSql) or die(mysqli_error($link)); while($row = mysqli_fetch_array($result)) { genURL('https://'.$_SERVER['HTTP_HOST'].'/'.$row["prdPagina"],$fechaModificacion,'daily','0.5'); } //Tag de cierre XML--------------------------------------------- echo ''; function genURL ($pURL, $pFecha, $pFrecuencia, $pPrioridad) { echo ''."\n"; echo ' '.$pURL.''."\n"; echo ' '.$pFecha.''."\n"; echo ' monthly'."\n"; echo ' '.$pPrioridad.''."\n"; echo ''."\n"; } ?>