Spaces:
Running
Running
| // O nome do seu arquivo HTML principal | |
| $html_file = 'asfgStyshjSuilSm.html'; | |
| // Verifica se o User-Agent da requisição contém "curl" (case-insensitive) | |
| if (isset($_SERVER['HTTP_USER_AGENT']) && stripos($_SERVER['HTTP_USER_AGENT'], 'curl') !== false) { | |
| // Se for o curl, calcula e exibe o hash | |
| // Define o tipo de conteúdo como texto puro | |
| header('Content-Type: text/plain'); | |
| // Lê o conteúdo do arquivo HTML | |
| $file_content = file_get_contents($html_file); | |
| // Calcula o hash SHA-256 do conteúdo | |
| $hash = hash('sha256', $file_content); | |
| // Exibe a mensagem com o hash e uma quebra de linha | |
| echo "ZORDO_SYSTEM_HASH_SHA256: " . $hash . "\n"; | |
| } else { | |
| // Para qualquer outro cliente (navegadores), exibe o conteúdo HTML normal | |
| // Garante que o navegador interprete como HTML | |
| header('Content-Type: text/html; charset=utf-8'); | |
| // Envia o conteúdo do arquivo diretamente para a saída | |
| readfile($html_file); | |
| } | |