<?php
header("Content-type: text/xml");
echo'<?xml version=\'1.0\' encoding=\'UTF-8\'?>';
echo' <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">';
include 'conexao.php';
include 'acoes.php';
$sql = mysql_query("select nome, nota from aluno");
while ($string = mysql_fetch_array($sql)){?>
<url>
<loc>http://www.escola.com.br/<?echo removerosAcentos($string['nome']);?>/<?echo $string['nota'];?></loc>
<changefreq>weekly</changefreq>
</url>
<?php } ?>
</urlset>
This code generates a sitemap (pulling from the database)
I need to generate a sitemap with 45 thousand (sitemap1.xml) and after reaching 45 thousand results another sitemap (sitemap2.xml) and so on.
There is a column named "numero" (Ex: 054322123) that can be used to sort. I have no idea how to do this. Can anyone help me in detail? Thanks!