true,CURLOPT_TIMEOUT=>8]); $r = json_decode(curl_exec($ch),true); curl_close($ch); return $r['devices'] ?? []; } function pmx_post(array $data): array { $ch = curl_init(PMX_API); curl_setopt_array($ch,[CURLOPT_RETURNTRANSFER=>true,CURLOPT_POST=>true,CURLOPT_POSTFIELDS=>http_build_query($data),CURLOPT_TIMEOUT=>8]); $r = json_decode(curl_exec($ch),true); curl_close($ch); return $r ?? []; } $notice = ''; $error = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $uid = preg_replace('/[^0-9A-Fa-f]/', '', $_POST['uid'] ?? ''); if (!$uid) { $error = 'UID inválido.'; } else { $res = pmx_post($_POST); if (!empty($res['ok'])) $notice = "[{$uid}] {$_POST['action']} OK"; else $error = $res['error'] ?? 'Erro'; } $qs = $notice ? '?ok='.urlencode($notice) : ($error ? '?err='.urlencode($error) : ''); header("Location: esp_devices.php$qs"); exit; } if (isset($_GET['ok'])) $notice = htmlspecialchars($_GET['ok']); if (isset($_GET['err'])) $error = htmlspecialchars($_GET['err']); $devices = pmx_get(); function h($s) { return htmlspecialchars((string)$s, ENT_QUOTES); } ?> ESP Devices — Proxmox
← Painel

ESP Devices — Proxmox broker

dispositivos

Sem dispositivos ou erro a ligar ao broker Proxmox.

UIDBroker atualEstadoÚltimo contactoHeapRSSIAções
bloqueado aprovado