<?php
// Set the content type to XML
header('Content-Type: text/xml');

// Define your pages with metadata
$pages = [
    [
        'loc' => 'https://yarramovers.com.au/',
        'lastmod' => date('Y-m-d'), 
        'changefreq' => 'weekly',
        'priority' => '1.0'
    ],
    [
        'loc' => 'https://yarramovers.com.au/furniture-moving-services.php',
        'lastmod' => '2025-04-12',
        'changefreq' => 'monthly',
        'priority' => '0.8'
    ],
    [
        'loc' => 'https://yarramovers.com.au/commercial-moving-services.php',
        'lastmod' => '2025-04-12',
        'changefreq' => 'monthly',
        'priority' => '0.8'
    ],
    [
        'loc' => 'https://yarramovers.com.au/contact',
        'lastmod' => '2025-04-12',
        'changefreq' => 'monthly',
        'priority' => '0.7'
    ]
    // Add more pages here as needed
];

// Start XML output
echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <?php foreach ($pages as $page): ?>
    <url>
        <loc><?php echo htmlspecialchars($page['loc']); ?></loc>
        <lastmod><?php echo $page['lastmod']; ?></lastmod>
        <changefreq><?php echo $page['changefreq']; ?></changefreq>
        <priority><?php echo $page['priority']; ?></priority>
    </url>
    <?php endforeach; ?>
</urlset>