<?php
error_reporting(0);

// Recupera dominio
$dominio = $_SERVER['HTTP_HOST'];

// Test connessione per nuove versioni mariadb
$mysqli = new mysqli("localhost", "rhx_icinga_monitor_user");

// MySQL non funziona Connect failed: 2002
if (2002 == $mysqli->connect_errno)
{
  header('HTTP/1.1 500 Internal Server Error');
}
else
{
  header("HTTP/1.1 200 OK");
}
$mysqli->close();
?>
<!DOCTYPE html>
<html lang="it">
<head>
    <meta charset="UTF-8">
    <title>Dominio <?php echo htmlspecialchars($dominio); ?> è registrato</title>
    <link rel="stylesheet" href="style.css">
</head>
<body class="bg-aurora">
    <h1>Dominio <?php echo htmlspecialchars($dominio); ?> è registrato</h1>
<br/>
    <h2>
        con
        <a href="https://www.bitname.it" target="_blank">bitName</a>
    </h2>
</body>
</html>
