getUserById($_SESSION['user_id']); // Get settings $settings = $db->getSettings(); @$GLOBALS['panel_language'] = $settings['panel_language']; ogpLang(); function ping_host($host, $timeout = 5) { if (function_exists('exec')) { $output = array(); $result = 0; // Use ping command based on OS if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { exec("ping -n 1 -w " . ($timeout * 1000) . " " . escapeshellarg($host), $output, $result); } else { exec("ping -c 1 -W " . $timeout . " " . escapeshellarg($host), $output, $result); } if ($result === 0) { // Extract ping time from output foreach ($output as $line) { if (preg_match('/time[<=]([0-9.]+)\s*ms/i', $line, $matches)) { return floatval($matches[1]); } } return 0; // Host is up but couldn't extract time } } return false; // Host is down or ping unavailable } function get_hostname($ip) { $hostname = gethostbyaddr($ip); return ($hostname && $hostname !== $ip) ? $hostname : false; } // Get all remote servers $servers = $db->getRemoteServers(); ?> Server Status - OGP

🖥️ Server Status Dashboard

No servers configured in the system.
status_chk(); $is_online = ($status === 1); // Get ping time $ping_time = ping_host($server_ip, 3); // Determine ping color class $ping_class = ''; if ($ping_time !== false) { if ($ping_time <= 50) { $ping_class = 'ping-good'; } elseif ($ping_time <= 150) { $ping_class = 'ping-medium'; } else { $ping_class = 'ping-bad'; } } ?>
Server Name Location/IP Hostname Status Ping (ms)

()
N/A'; ?> 🟢 UP 🔴 DOWN ms N/A
Last updated:
← Back to Dashboard