<?php
function tx_host(){
  $host = $_SERVER['HTTP_HOST'] ?? ($_SERVER['SERVER_NAME'] ?? '');
  return preg_replace('/[^A-Za-z0-9\-\.:]/', '', $host);
}
function tx_scheme(){
  $https = $_SERVER['HTTPS'] ?? '';
  $proto = $_SERVER['HTTP_X_FORWARDED_PROTO'] ?? '';
  return ($https && $https !== 'off') || $proto === 'https' ? 'https' : 'http';
}
function tx_origin(){ return tx_scheme().'://'.tx_host(); }
function tx_url($path='/'){
  $path = '/'.ltrim($path,'/');
  return tx_origin().$path;
}
function tx_today(){ return date('Y年m月d日'); }
$brand = '糖心vlog';
$siteTitle = '糖心vlog在线观看视频|免费网页版入口推荐';
$host = tx_host();
$origin = tx_origin();
$today = tx_today();
?>
<?php
header('Content-Type: application/xml; charset=utf-8');
$paths = ['/', '/category/videos/', '/category/news/', '/category/observe/', '/topics/week/', '/authors/', '/about/', '/contact/', '/articles/shenghuo-jineng-shipin/', '/articles/chengshi-guancha-vlog/', '/articles/chuangzuo-jiaocheng-yanjiu/'];
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
foreach($paths as $p){
  echo "  <url>\n";
  echo "    <loc>".htmlspecialchars(tx_url($p), ENT_XML1, 'UTF-8')."</loc>\n";
  echo "    <lastmod>".date('Y-m-d')."</lastmod>\n";
  echo "    <changefreq>daily</changefreq>\n";
  echo "    <priority>".($p==='/'?'1.0':'0.8')."</priority>\n";
  echo "  </url>\n";
}
echo "</urlset>";
?>