|
Server : LiteSpeed System : Linux terra.hostitbro.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : outerorb ( 1091) PHP Version : 8.1.34 Disable Function : mail Directory : /home2/outerorb/techcare-services.com/bckp/ | |
|
Path: /home2/outerorb/techcare-services.com/bckp/sitemap.xml
Size: 3.34 KB
Permissions: 0666
<?php
/**
* TechCare Services - Dynamic XML Sitemap
* Automatically generates sitemap.xml for all pages
*/
// Include configuration
require_once 'config.php';
// Set content type to XML
header('Content-Type: application/xml; charset=utf-8');
// Start XML output
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"' . "\n";
echo ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' . "\n";
echo ' xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9' . "\n";
echo ' http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">' . "\n";
// Define all pages with their priorities and change frequencies
$pages = [
// Homepage - highest priority
[
'url' => SITE_URL . '/',
'priority' => '1.0',
'changefreq' => 'weekly',
'lastmod' => date('Y-m-d')
],
// Main pages
[
'url' => SITE_URL . '/about.php',
'priority' => '0.8',
'changefreq' => 'monthly',
'lastmod' => date('Y-m-d')
],
[
'url' => SITE_URL . '/services.php',
'priority' => '0.9',
'changefreq' => 'weekly',
'lastmod' => date('Y-m-d')
],
[
'url' => SITE_URL . '/contact.php',
'priority' => '0.8',
'changefreq' => 'monthly',
'lastmod' => date('Y-m-d')
],
// Service pages
[
'url' => SITE_URL . '/service-seo.php',
'priority' => '0.7',
'changefreq' => 'weekly',
'lastmod' => date('Y-m-d')
],
[
'url' => SITE_URL . '/service-social-media.php',
'priority' => '0.7',
'changefreq' => 'weekly',
'lastmod' => date('Y-m-d')
],
[
'url' => SITE_URL . '/service-ppc.php',
'priority' => '0.7',
'changefreq' => 'weekly',
'lastmod' => date('Y-m-d')
],
[
'url' => SITE_URL . '/service-content-marketing.php',
'priority' => '0.7',
'changefreq' => 'weekly',
'lastmod' => date('Y-m-d')
],
[
'url' => SITE_URL . '/service-antivirus.php',
'priority' => '0.8',
'changefreq' => 'weekly',
'lastmod' => date('Y-m-d')
],
[
'url' => SITE_URL . '/service-cybersecurity.php',
'priority' => '0.7',
'changefreq' => 'weekly',
'lastmod' => date('Y-m-d')
],
[
'url' => SITE_URL . '/service-ai-driven-digital-marketing.php',
'priority' => '0.7',
'changefreq' => 'weekly',
'lastmod' => date('Y-m-d')
],
// Legal pages
[
'url' => SITE_URL . '/privacy.php',
'priority' => '0.3',
'changefreq' => 'yearly',
'lastmod' => date('Y-m-d')
],
[
'url' => SITE_URL . '/terms.php',
'priority' => '0.3',
'changefreq' => 'yearly',
'lastmod' => date('Y-m-d')
]
];
// Generate XML for each page
foreach ($pages as $page) {
echo " <url>\n";
echo " <loc>" . htmlspecialchars($page['url']) . "</loc>\n";
echo " <lastmod>" . $page['lastmod'] . "</lastmod>\n";
echo " <changefreq>" . $page['changefreq'] . "</changefreq>\n";
echo " <priority>" . $page['priority'] . "</priority>\n";
echo " </url>\n";
}
echo '</urlset>';
?>