<?php
header('Content-Type: application/xml; charset=utf-8');
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
$currentHost = isset($_SERVER['HTTP_HOST']) ? preg_replace('/[^A-Za-z0-9\.\-:]/', '', $_SERVER['HTTP_HOST']) : '';
$base = $scheme . '://' . $currentHost;
$today = date('Y-m-d');
$urls = ['/', '/brand-story/', '/selected/', '/case-center/', '/insights/', '/guide/', '/updates/', '/about/'];
echo "<?xml version="1.0" encoding="UTF-8"?>
";
?>
<urlset xmlns="<?php $nsProto='http'; echo $nsProto . '://www.' . 'sitemaps' . '.org/schemas/sitemap/0.9'; ?>">
<?php foreach($urls as $u): ?>
  <url><loc><?php echo htmlspecialchars($base . $u, ENT_QUOTES, 'UTF-8'); ?></loc><lastmod><?php echo $today; ?></lastmod><changefreq>daily</changefreq><priority><?php echo $u === '/' ? '1.0' : '0.8'; ?></priority></url>
<?php endforeach; ?>
</urlset>
