<?php
// sitemap.php - Save as sitemap.xml in root
header('Content-Type: application/xml; charset=utf-8');

$domain = "https://www.leakfreeseals.com";
$pages = [
    ['url' => '/', 'priority' => '1.0', 'changefreq' => 'daily'],
    ['url' => '/about.html', 'priority' => '0.8', 'changefreq' => 'monthly'],
    ['url' => '/products.php', 'priority' => '0.9', 'changefreq' => 'weekly'],
    ['url' => '/productsGallery.php', 'priority' => '0.8', 'changefreq' => 'weekly'],
    ['url' => '/certificates.html', 'priority' => '0.7', 'changefreq' => 'monthly'],
    ['url' => '/contact.html', 'priority' => '0.7', 'changefreq' => 'yearly']
];

echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <?php foreach($pages as $page): ?>
    <url>
        <loc><?php echo $domain . $page['url']; ?></loc>
        <lastmod><?php echo date('Y-m-d'); ?></lastmod>
        <changefreq><?php echo $page['changefreq']; ?></changefreq>
        <priority><?php echo $page['priority']; ?></priority>
    </url>
    <?php endforeach; ?>
</urlset>