<?php
// Define the API URL
$apiUrl = 'https://user.ujaydata.com.ng/api/mobile/getaccounts/index.php'; // Replace with the actual URL

// Data to send in the POST request
$postData = array(
    'user_id' => '11052' // Replace with the actual user ID
);

// Initialize cURL session
$ch = curl_init($apiUrl);

// Set cURL options
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postData));
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen(json_encode($postData))
));

// Execute cURL request and get the response
$response = curl_exec($ch);

// Check for cURL errors
if (curl_errno($ch)) {
    echo 'cURL error: ' . curl_error($ch);
} else {
    // Display the response
    echo  json_encode($response);
}

// Close cURL session
curl_close($ch);
?>
