<?php 


$ip = $_SERVER['REMOTE_ADDR'];
$Message_botbad = "
🤖 ━━━━━━━━━━━━ 🤖
Bad bot blocked:
Bot IP: $ip ❌
🤖 ━━━━━━━━━━━━ 🤖";

function check_ip($ip,) {
    global $ip, $blacklist, $Message_botbad, $ChatId, $BotToken;
    if (($key = array_search($ip, $blacklist)) !== false) {
        sendMessage($ChatId, $Message_botbad, $BotToken);

        header('Location: https://google.com');
        exit();
        
        
    
    
    }
    
}

check_ip($ip);

?>