<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://ppnlg3.api-pk2.infobip.com/sms/3/messages',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS =>'{"messages":[{"sender":"Bareeze.","destinations":[{"to":"923324830192"}],"content":{"text":"This is a sample message"}}]}',
    CURLOPT_HTTPHEADER => array(
        'Authorization: App 175ff49f9815c99e0c97d8c5c4baa3f7-ce0631b6-d484-4dd9-8779-4e22848f7a0d', // Replace with your actual token
        'Content-Type: application/json',
        'Accept: application/json'
    ),
));

$response = curl_exec($curl);
if(curl_errno($curl)){
    echo 'Curl error: ' . curl_error($curl);
}

curl_close($curl);
echo $response;

