// Contoh kode PHP cURL untuk panggilan API
// Pastikan mengganti placeholder dengan informasi yang sesuai

$apiUrl = 'your-api-url';
$apiKey = 'your-api-key';

// Inisialisasi session cURL / panggil API
$ch = curl_init();

// Set URL dan opsi cURL
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Ocp-Apim-Subscription-Key: ' . $apiKey,
]);

// Eksekusi cURL dan dapatkan respons
$response = curl_exec($ch);

// Tangani kesalahan jika terjadi
if (curl_errno($ch)) {
    echo 'Error: ' . curl_error($ch);
}

// Tutup session cURL
curl_close($ch);

// Proses hasil respons API di sini
$data = json_decode($response, true);
var_dump($data);