<?php
require_once '../app/bootstrap.php'; // Adjust path to your bootstrap file

header('Content-Type: application/xml; charset=utf-8');

// Your sitemap generation code
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';

// Homepage
echo '<url>';
echo '<loc>https://' . $_SERVER['HTTP_HOST'] . '</loc>';
echo '<lastmod>' . date('Y-m-d') . '</lastmod>';
echo '<changefreq>daily</changefreq>';
echo '<priority>1.0</priority>';
echo '</url>';

// Add your dynamic URLs here (products, categories, etc.)
// You'll need to include your models and fetch data

echo '</urlset>';
?>