🚀 Hostinger Optimized
🖥️ Server: LiteSpeed
💻 System: Linux s20058.bom1.stableserver.net 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64
👤 User: skhata (1324)
🐘 PHP: 8.4.20
🚫 Disabled: ✨ NONE

💻 Terminal

📁 /home/skhata/chandrasons.com/public
$

📄 sitemap.php

📁 Path: /home/skhata/excellenteducation.com.np/sitemap.php
📊 Size: 1.68 KB
🔒 Perm: 0644
📝 MIME: text/x-php
<?php
require_once __DIR__ . '/includes/functions.php';

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

$urls = [
    ['loc' => 'index.php', 'priority' => '1.0'],
    ['loc' => 'about.php', 'priority' => '0.8'],
    ['loc' => 'study-abroad.php', 'priority' => '0.9'],
    ['loc' => 'test-preparation.php', 'priority' => '0.9'],
    ['loc' => 'gallery.php', 'priority' => '0.6'],
    ['loc' => 'blog.php', 'priority' => '0.7'],
    ['loc' => 'contact.php', 'priority' => '0.7'],
];

$countries = db()->query("SELECT slug, updated_at FROM countries WHERE status = 'active'")->fetchAll();
foreach ($countries as $c) {
    $urls[] = ['loc' => 'study-abroad-' . $c['slug'] . '.php', 'priority' => '0.8', 'lastmod' => $c['updated_at']];
}

$programs = db()->query("SELECT slug, updated_at FROM test_preparations WHERE status = 'active'")->fetchAll();
foreach ($programs as $p) {
    $urls[] = ['loc' => 'test-preparation-' . $p['slug'] . '.php', 'priority' => '0.8', 'lastmod' => $p['updated_at']];
}

$posts = db()->query("SELECT slug, created_at FROM blogs WHERE status = 'published'")->fetchAll();
foreach ($posts as $p) {
    $urls[] = ['loc' => 'blog-' . $p['slug'] . '.php', 'priority' => '0.6', 'lastmod' => $p['created_at']];
}

echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . "\n";
foreach ($urls as $u) {
    echo "  <url>\n";
    echo '    <loc>' . e(SITE_URL . '/' . $u['loc']) . "</loc>\n";
    if (!empty($u['lastmod'])) {
        echo '    <lastmod>' . e(date('Y-m-d', strtotime($u['lastmod']))) . "</lastmod>\n";
    }
    echo '    <priority>' . e($u['priority']) . "</priority>\n";
    echo "  </url>\n";
}
echo '</urlset>';
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨