';
$transaction .= '';
$namespace = '';
$namespace .= '';
$namespaces = [];
$transactions = [];
foreach ($db->getData(false, false, false, 0, 1000000) as $value) {
if (!in_array($value['namehash'], $namespaces)) {
$namespace .= '' . BASE_URL . '/' . $value['namehash'] . '';
}
if (!in_array($value['namehash'], $transactions)) {
$transaction .= '' . BASE_URL . '/' . $value['txid'] . '';
}
$namespaces[] = $value['namehash'];
$transactions[] = $value['txid'];
}
$namespace .= '';
$transaction .= '';
$handle = fopen(dirname(__FILE__) . '/../public/sitemap.transaction.xml', 'w');
fwrite($handle, $transaction);
fclose($handle);
$handle = fopen(dirname(__FILE__) . '/../public/sitemap.namespace.xml', 'w');
fwrite($handle, $namespace);
fclose($handle);
// Sitemap
$sitemap = '';
$sitemap .= '';
$sitemap .= ' ';
$sitemap .= ' ' . BASE_URL . '/sitemap.namespace.xml';
$sitemap .= ' ';
$sitemap .= ' ';
$sitemap .= ' ' . BASE_URL . '/sitemap.transaction.xml';
$sitemap .= ' ';
$sitemap .= '';
$handle = fopen(dirname(__FILE__) . '/../public/sitemap.xml', 'w');
fwrite($handle, $sitemap);
fclose($handle);