initial commit

This commit is contained in:
2026-07-22 01:12:45 +02:00
commit 124f2746ac
357 changed files with 159669 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
require_once __DIR__ . '/../lib/PveApi.php';
$cfg = require __DIR__ . '/../config/pve.php';
$pve = new PveApi($cfg);
header('Content-Type: application/json; charset=utf-8');
try {
$vmid = (int)($_GET['vmid'] ?? 0);
if ($vmid <= 0) throw new InvalidArgumentException("vmid fehlt/ungültig");
$data = $pve->statusCurrent($vmid);
echo json_encode(['ok' => true, 'vmid' => $vmid, 'data' => $data]);
} catch (Throwable $e) {
http_response_code(400);
echo json_encode(['ok' => false, 'error' => $e->getMessage()]);
}