<commit_before><?php
//
// Sitemap https://support.google.com/webmasters/answer/183668
// Sitemap stylesheet http://www.w3.org/TR/xslt-30/
// 50,000 URLs or maximum size of 10MB http://googlewebmastercentral.blogspot.com/2014/10/best-practices-for-xml-sitemaps-rssatom.html
//

include 'content/config.php';
include 'content/connect.php';
include 'content/cache.php'; cache::medb();

echo '<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="' . $scheme . '://' . $host . $path . '/sitemap.xsl"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
    xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
    xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">';

if ($stmt = $mysqli->prepare('SELECT url, GREATEST(modified, created) AS date FROM `' . table . '` ORDER BY `order` ASC')) {
    $stmt->execute();
    $stmt->bind_result($url, $date);

    while ($stmt->fetch()) echo "\n    <url>\n        <loc>$scheme://$host$path" . (strlen($url) ? "/$url" : null) . "</loc>\n        <lastmod>" . date('Y-m-d\TH:i\Z', strtotime($date)) . "</lastmod>\n    </url>";

    $stmt->free_result();
    $stmt->close();
}

$mysqli->close();

echo "\n</urlset>";<commit_msg>GMT/UTC ISO 8601 date format<commit_after><?php
//
// Sitemap https://support.google.com/webmasters/answer/183668
// Sitemap stylesheet http://www.w3.org/TR/xslt-30/
// 50,000 URLs or maximum size of 10MB http://googlewebmastercentral.blogspot.com/2014/10/best-practices-for-xml-sitemaps-rssatom.html
//

include 'content/config.php';
include 'content/connect.php';
include 'content/cache.php'; cache::medb();

echo '<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="' . $scheme . '://' . $host . $path . '/sitemap.xsl"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
    xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
    xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">';

if ($stmt = $mysqli->prepare('SELECT url, GREATEST(modified, created) AS date FROM `' . table . '` ORDER BY `order` ASC')) {
    $stmt->execute();
    $stmt->bind_result($url, $date);

    while ($stmt->fetch()) echo "\n    <url>\n        <loc>$scheme://$host$path" . (strlen($url) ? "/$url" : null) . "</loc>\n        <lastmod>" . gmdate('c', strtotime($date)) . "</lastmod>\n    </url>";

    $stmt->free_result();
    $stmt->close();
}

$mysqli->close();

echo "\n</urlset>";
{'fraction_non_alphanumeric': 0.23177723177723178, 'fraction_numerical': 0.02702702702702703, 'mean_word_length': 3.6268939393939394, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 2, '>': 37, 'https://': 2, 'lorem ipsum': 0, 'www.': 8, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4170609', 'n_tokens_mistral': 970, 'n_tokens_neox': 906, 'n_words': 149}