2 ? implode('.', array_slice($parts, 0, -2)) : $parts[0];
$is_https = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
$gen_start = $_SERVER['REQUEST_TIME_FLOAT'];
$server_data = [
'Hostname' => $host_no_port,
'Protocol' => $_SERVER['SERVER_PROTOCOL'] ?? 'N/A',
'HTTPS' => $is_https ? 'Yes' : 'No',
'Port' => $_SERVER['SERVER_PORT'] ?? 'N/A',
'Request Method' => $_SERVER['REQUEST_METHOD'] ?? 'N/A',
'Request URI' => $_SERVER['REQUEST_URI'] ?? 'N/A',
'Server Time' => date('Y-m-d H:i:s T'),
'Timezone' => date_default_timezone_get(),
];
$gen_time = microtime(true) - $gen_start;
$env_map = ['dev'=>'Development','staging'=>'Staging','test'=>'Testing','prod'=>'Production','api'=>'API','app'=>'Application','admin'=>'Admin','cdn'=>'CDN','mail'=>'Mail'];
$env = 'Active';
foreach ($env_map as $k => $v) { if (str_contains($subdomain, $k)) { $env = $v; break; } }
?>
= htmlspecialchars($env) ?>
= htmlspecialchars($subdomain) ?> is live.
= htmlspecialchars($host_no_port) ?> · Diagnostics landing page
Serving · 0s · generated in = round($gen_time * 1000, 1) ?>ms
= $is_https ? '🔒 TLS' : '⚠️ HTTP' ?>
Connection
= htmlspecialchars($server_data['Port']) ?>
Port
= htmlspecialchars($server_data['Request Method']) ?>
Method
$v): ?>
| = $k ?> | = htmlspecialchars($v) ?> |
| Generation Time | = round($gen_time * 1000, 1) ?> ms |