Update: 2026-07-02 05:27:04

This commit is contained in:
Hamza-Ayed
2026-07-02 05:27:05 +03:00
parent d2ce4bdb16
commit 05d047d871
25 changed files with 1625 additions and 85 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
/**
* get_hotzones.php
* ───────────────
* واجهة فائقة السرعة (Ultra-Fast API) مخصصة لتطبيق السائق (Flutter).
* تقرأ المناطق الساخنة (Hot Zones) التي حددها الذكاء الاصطناعي من الـ Redis مباشرة.
* زمن الاستجابة: O(1).
*/
header('Content-Type: application/json; charset=utf-8');
require_once __DIR__ . '/../../connect.php';
$countryCode = strtoupper(filterRequest('country_code') ?? 'JO');
try {
$redis = getRedisConnection();
$hotZonesJson = $redis->get('siro:cache:ai:hotzones');
} catch (Exception $e) {
echo json_encode(["status" => "error", "message" => "Redis connection failed"]);
exit;
}
if (!$hotZonesJson) {
echo json_encode(["status" => "success", "data" => [], "message" => "No hot zones available"]);
exit;
}
// الـ JSON القادم من Redis تم تصميمه بالفعل بالشكل النهائي المطلوب للتطبيق
echo $hotZonesJson;
?>