<?php
header('Content-Type: application/xml; charset=UTF-8');
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
$currentHost = $_SERVER['HTTP_HOST'] ?? ($_SERVER['SERVER_NAME'] ?? '');
$base = $scheme . '://' . $currentHost;
$urls = ['/', '/about/', '/products/', '/solutions/', '/cases/', '/news/', '/resources/', '/blog/', '/developers/', '/customers/', '/contact/', '/search/'];
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?php foreach ($urls as $u): ?>
  <url><loc><?php echo htmlspecialchars($base . $u, ENT_QUOTES, 'UTF-8'); ?></loc><changefreq>daily</changefreq><priority><?php echo $u === '/' ? '1.0' : '0.8'; ?></priority></url>
<?php endforeach; ?>
</urlset>
