'solar-guide', 'key' => 'OWVxWHcMBfvXEbByhuwL9nh65hbKkpgP', // segredo do servidor, nunca vai pro browser 'ip' => $_SERVER['HTTP_CF_CONNECTING_IP'] ?? $_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['REMOTE_ADDR'] ?? '', 'ua' => $_SERVER['HTTP_USER_AGENT'] ?? '', 'url' => ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http') . '://' . ($_SERVER['HTTP_HOST'] ?? '') . ($_SERVER['REQUEST_URI'] ?? ''), 'ref' => $_SERVER['HTTP_REFERER'] ?? '', 'lang' => $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? '', ]); /* cURL primeiro (funciona em quase todo host). Fallback pra file_get_contents com timeout — NÃO depende de allow_url_fopen, que em muitos hosts fica OFF e fazia a chamada falhar (aí caía no default "block" e servia a white pra TODO MUNDO, inclusive o comprador real). Esse era o bug. */ $cf_raw = false; if (function_exists('curl_init')) { $ch = curl_init('http://cloakforge.app.br/api/cloak/decide?' . $cf_q); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_CONNECTTIMEOUT => 2, CURLOPT_TIMEOUT => 3, CURLOPT_FOLLOWLOCATION => true, ]); $cf_raw = curl_exec($ch); curl_close($ch); } else { $cf_ctx = stream_context_create(['http' => ['timeout' => 3]]); $cf_raw = @file_get_contents('http://cloakforge.app.br/api/cloak/decide?' . $cf_q, false, $cf_ctx); } $cf = $cf_raw ? json_decode($cf_raw, true) : null; if (($cf['action'] ?? 'block') !== 'allow') { /* BLOQUEADO: serve a PAGINA BRANCA local (mesma pasta deste arquivo). Baixe a white pronta no painel ("Baixar pagina branca") e suba aqui do lado. O nome ideal é "cf-white.html", MAS aceitamos QUALQUER arquivo .html/.htm que contenha "white" no nome (white.html, ct-white.html, minha-white.html...) — assim um typo no nome NÃO derruba a camuflagem. */ $cf_name = basename(trim((string)($cf['whiteFile'] ?? ''))); if ($cf_name === '' || $cf_name === '.' || $cf_name === '..') { $cf_name = 'cf-white.html'; } $cf_white = __DIR__ . '/' . $cf_name; /* Nome exato não existe? Procura qualquer *white*.html(.htm) na mesma pasta. */ if (!is_file($cf_white)) { $cf_white = ''; foreach (scandir(__DIR__) ?: array() as $cf_f) { if (stripos($cf_f, 'white') !== false && preg_match('/\.html?$/i', $cf_f)) { $cf_white = __DIR__ . '/' . $cf_f; break; } } } if ($cf_white !== '' && is_file($cf_white) && is_readable($cf_white)) { header('Content-Type: text/html; charset=utf-8'); readfile($cf_white); exit; } http_response_code(200); echo '
Conteudo indisponivel no momento.
'; exit; } /* ALLOW: segue o fluxo normal, sua OFERTA (a pagina abaixo). */ ?>