<?php
header('Content-Type: application/xml; charset=utf-8');
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
$host = $_SERVER['HTTP_HOST'] ?? 'localhost';
$base = $scheme . '://' . $host;
$lastmod = date('Y-m-d');
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
    <url>
        <loc><?= htmlspecialchars($base) ?>/</loc>
        <lastmod><?= $lastmod ?></lastmod>
        <changefreq>monthly</changefreq>
        <priority>1.0</priority>
        <image:image>
            <image:loc><?= htmlspecialchars($base) ?>/hr-discoverlab.png</image:loc>
            <image:title>HR DiscoverLab</image:title>
        </image:image>
        <image:image>
            <image:loc><?= htmlspecialchars($base) ?>/DSC_7490.JPG</image:loc>
            <image:title>Harsha — Full Stack Developer</image:title>
        </image:image>
    </url>
</urlset>
