<?php
header('Content-Type: application/xml; charset=utf-8');

echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';

// homepage
echo '<url>';
echo '<loc>https://pricepulsetravel.com/</loc>';
echo '<lastmod>2025-10-10</lastmod>';
echo '<priority>1.0</priority>';
echo '</url>';

// main pages
$pages = [
    'travel-info.php',
    'visa-info.php',
    'study-info.php',
    'work-info.php',
    'travel-programs.php',
    'tour-packages.php',
    'travel-insurance.php',
    'flight-booking.php',
    'hotel-booking.php',
    'forex.php',
    'travel-news.php',
    'itinerary.php',
    'ratings.php',
    'contact.php'
];

foreach ($pages as $page) {
    $filePath = __DIR__ . '/' . $page;

    $lastMod = file_exists($filePath)
        ? date('Y-m-d', filemtime($filePath))
        : date('Y-m-d');

    echo '<url>';
    echo '<loc>https://pricepulsetravel.com/' . $page . '</loc>';
    echo '<lastmod>' . $lastMod . '</lastmod>';
    echo '</url>';
}

echo '</urlset>';
