<?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">';

// আপনার ডাটাবেস কানেকশন এখানে দিন
$conn = new mysqli("localhost", "আপনার_ইউজারনেম", "আপনার_পাসওয়ার্ড", "jiyawebs_jiya_web_solution");

// ১. স্ট্যাটিক পেজগুলো যোগ করুন
$static_pages = [
    'https://jiyawebsolution.in/',
    'https://jiyawebsolution.in/index.php',
    'https://jiyawebsolution.in/about.php',
    'https://jiyawebsolution.in/services.php',
    'https://jiyawebsolution.in/contact.php',
    'https://jiyawebsolution.in/source_code.php',
    'https://jiyawebsolution.in/blog.php',
    'https://jiyawebsolution.in/inquiry.php',
    'https://jiyawebsolution.in/login',
    'https://jiyawebsolution.in/design.php',
    'https://jiyawebsolution.in/development.php',
    'https://jiyawebsolution.in/apps.php',
    'https://jiyawebsolution.in/seo.php',
    'https://jiyawebsolution.in/marketing.php',
    'https://jiyawebsolution.in/e-commerce.php'
];

foreach($static_pages as $page) {
    echo '<url><loc>'.$page.'</loc><changefreq>daily</changefreq></url>';
}

// ২. ডাটাবেস থেকে প্রোডাক্টস পেজগুলো যোগ করুন
$products = $conn->query("SELECT id FROM products");
while($row = $products->fetch_assoc()) {
    echo '<url><loc>https://jiyawebsolution.in/product.php?id='.$row['id'].'</loc><changefreq>weekly</changefreq></url>';
}

// ৩. ডাটাবেস থেকে ব্লগ পেজগুলো যোগ করুন
$blogs = $conn->query("SELECT id FROM blogs");
while($row = $blogs->fetch_assoc()) {
    echo '<url><loc>https://jiyawebsolution.in/blog.php?id='.$row['id'].'</loc><changefreq>weekly</changefreq></url>';
}

echo '</urlset>';
?>