OwlCyberSecurity - MANAGER
Edit File: sitemap.php
<?php include("includes/config.php"); include("includes/conexao.php"); header("Content-Type: application/xml; charset=UTF-8"); echo '<?xml version="1.0" encoding="UTF-8"?>'; $hoje = date('Y-m-d'); function remove_char($str){ $str = str_replace(array("&"), "e", $str); return $str; } ?> <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"> <url> <loc>https:<?php echo URL_BASE ?></loc> <lastmod><?php echo $hoje; ?></lastmod> <priority>1.0000</priority> <changefreq>daily</changefreq> </url> <url> <loc>https:<?php echo URL_BASE ?>exclusive-games</loc> <lastmod><?php echo $hoje; ?></lastmod> <priority>0.8000</priority> <changefreq>daily</changefreq> </url> <url> <loc>https:<?php echo URL_BASE ?>random-game</loc> <lastmod><?php echo $hoje; ?></lastmod> <priority>0.8000</priority> <changefreq>daily</changefreq> </url> <url> <loc>https:<?php echo URL_BASE ?>about</loc> <lastmod><?php echo $hoje; ?></lastmod> <priority>0.8000</priority> <changefreq>daily</changefreq> </url> <url> <loc>https:<?php echo URL_BASE ?>contact</loc> <lastmod><?php echo $hoje; ?></lastmod> <priority>0.8000</priority> <changefreq>daily</changefreq> </url> <url> <loc>https:<?php echo URL_BASE ?>/friends-sites</loc> <lastmod><?php echo $hoje; ?></lastmod> <priority>0.8000</priority> <changefreq>daily</changefreq> </url> <url> <loc>https:<?php echo URL_BASE ?>/poll</loc> <lastmod><?php echo $hoje; ?></lastmod> <priority>0.8000</priority> <changefreq>daily</changefreq> </url> <?php /** * CATEGORIAS -------------------------------------------------------------- */ $querycat = $db->prepare("SELECT urlamigavel FROM categorias"); $querycat->execute(); $resultcat = $querycat->fetchAll(PDO::FETCH_ASSOC); foreach ($resultcat as $itemcat) { ?> <url> <loc>https:<?= URL_BASE ?>game-category/<?= $itemcat['urlamigavel'] ?></loc> <lastmod><?php echo $hoje; ?></lastmod> <priority>0.8000</priority> <changefreq>daily</changefreq> </url> <?php }//foreach ?> <?php /** * Jogos Popular -------------------------------------------------------------- */ $query = $db->prepare("SELECT game, url, imagem FROM game WHERE publicado=true AND data_publicar <= NOW()"); $query->execute(); $result = $query->fetchAll(PDO::FETCH_ASSOC); foreach ($result as $item) { ?> <url> <loc>https:<?= URL_BASE ?>game/<?= $item['url'] ?></loc> <image:image> <image:loc>http:<?= URL_BASE_GAMES ?>icones/<?= $item['imagem'] ?></image:loc> <image:title><?= remove_char($item['game']) ?></image:title> </image:image> <lastmod><?php echo $hoje; ?></lastmod> <priority>0.8000</priority> <changefreq>daily</changefreq> </url> <?php } ?> <?php /** * TAGS -------------------------------------------------------------------- */ $query = $db->prepare("SELECT t.nome FROM game_tags AS t WHERE (SELECT COUNT(*) FROM game WHERE tags LIKE concat('%',t.nome,'%')) > 0 AND t.nome <> ''"); $query->execute(); $result = $query->fetchAll(PDO::FETCH_ASSOC); foreach ($result as $item) { ?> <url> <loc>https:<?= URL_BASE ."tags/".urlencode($item['nome']) ?></loc> <lastmod><?php echo $hoje; ?></lastmod> <priority>0.8000</priority> <changefreq>daily</changefreq> </url> <?php } ?> </urlset>