Update: 2026-07-23 02:14:58
This commit is contained in:
@@ -82,7 +82,7 @@ function findBestDrivers($con, $lat, $lng, $carType, $endLat = null, $endLng = n
|
||||
// 🔥 [Fix Hardcoded URL] كان مثبتاً على رابط الإنتاج مباشرة بخلاف كل استدعاء
|
||||
// آخر لسيرفر اللوكيشن في هذا الملف (يعتمد على env)، فأي بيئة غير إنتاج كانت
|
||||
// تضرب سيرفر الإنتاج الحقيقي بالخطأ.
|
||||
$locationServerUrl = getenv('LOCATION_API_URL') ?: "https://location.intaleq.xyz/api_get_nearby.php";
|
||||
$locationServerUrl = getenv('LOCATION_API_URL') ?: "http://nginx/loction_server/api_get_nearby.php";
|
||||
$INTERNAL_KEY = function_exists('getInternalSocketKey') ? getInternalSocketKey() : '';
|
||||
|
||||
$postData = ['lat' => $lat, 'lng' => $lng, 'radius' => 5, 'limit' => 100];
|
||||
@@ -253,7 +253,7 @@ function getDistanceBetweenPoints($lat1, $lon1, $lat2, $lon2) {
|
||||
}
|
||||
// --- دالة مساعدة لمخاطبة سيرفر السائقين (Location Socket) ---
|
||||
function notifyDriversRideTaken($rideId, $winnerDriverId) {
|
||||
$url = getenv('LOCATION_SERVER_URL') ?: 'http://location.intaleq.xyz:2021';
|
||||
$url = getenv('LOCATION_SERVER_URL') ?: 'http://nginx/loction_server/driver_socket.php';
|
||||
if (!isAllowedSocketUrl($url)) return;
|
||||
$INTERNAL_KEY = function_exists('getInternalSocketKey') ? getInternalSocketKey() : '';
|
||||
|
||||
@@ -275,7 +275,7 @@ function notifyDriversRideTaken($rideId, $winnerDriverId) {
|
||||
curl_close($ch);
|
||||
}
|
||||
function notifyDriversOnLocationServer($drivers_ids_array, $payload, $rideId = null) {
|
||||
$url = getenv('LOCATION_SERVER_URL') ?: 'http://location.intaleq.xyz:2021';
|
||||
$url = getenv('LOCATION_SERVER_URL') ?: 'http://nginx/loction_server/driver_socket.php';
|
||||
if (!isAllowedSocketUrl($url)) return null;
|
||||
$INTERNAL_KEY = function_exists('getInternalSocketKey') ? getInternalSocketKey() : '';
|
||||
|
||||
@@ -311,7 +311,7 @@ function notifyDriversOnLocationServer($drivers_ids_array, $payload, $rideId = n
|
||||
* تخاطب السوكيت الموجود محلياً على نفس السيرفر
|
||||
*/
|
||||
function notifyPassengerOnRideServer($passenger_id, $payload) {
|
||||
$url = getenv('RIDE_SOCKET_URL') ?: 'http://location.intaleq.xyz:3031';
|
||||
$url = getenv('RIDE_SOCKET_URL') ?: 'http://nginx/loction_server/passenger_socket.php';
|
||||
if (!isAllowedSocketUrl($url)) return null;
|
||||
$INTERNAL_KEY = function_exists('getInternalSocketKey') ? getInternalSocketKey() : '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user