<?php
header('Content-Type: application/xml; charset=utf-8');
echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?php
$urls = [
  ['loc' => 'https://www.vehiclesonrent.com/', 'file' => 'index.php', 'changefreq' => 'weekly', 'priority' => '1.0'],
  ['loc' => 'https://www.vehiclesonrent.com/rentals.php', 'file' => 'rentals.php', 'changefreq' => 'weekly', 'priority' => '0.8'],
  ['loc' => 'https://www.vehiclesonrent.com/about.php', 'file' => 'about.php', 'changefreq' => 'monthly', 'priority' => '0.6'],
  ['loc' => 'https://www.vehiclesonrent.com/contact.php', 'file' => 'contact.php', 'changefreq' => 'monthly', 'priority' => '0.6'],
  ['loc' => 'https://www.vehiclesonrent.com/clientsection.php', 'file' => 'clientsection.php', 'changefreq' => 'monthly', 'priority' => '0.5'],
];

foreach($urls as $url) {
  if (file_exists($url['file'])) {
    $lastmod = date('Y-m-d', filemtime($url['file']));
    echo "<url>
      <loc>{$url['loc']}</loc>
      <lastmod>{$lastmod}</lastmod>
      <changefreq>{$url['changefreq']}</changefreq>
      <priority>{$url['priority']}</priority>
    </url>";
  }
}
?>
</urlset>
