$n);
}
$postdata = array(
'sms' => array(
'message' => array(
'text' => $smsMessage,
'sender' => $sender
),
'recipients' => array('gsm' => $recipients)
)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.smsfactor.com/send");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postdata));
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Accept: application/json', 'Authorization: Bearer ' . $token));
$response = curl_exec($ch);
curl_close($ch);
if (isset($debug[1]) && $debug[1] == '1' ) $msg123=$msg123. '
Retour SMS' .$response;
}
else {
// -----------------------------------------------------
// Version SMS free API
// -----------------------------------------------------
setlocale (LC_TIME, 'fr_FR.utf8','fra');
$output='';
$monUrl='https://smsapi.free-mobile.fr/sendmsg?user=19135992&pass=NcUXH82kynfS5B&msg=' .$smsMessage;
include ("smsFree.php");
$admMsg .= '
' .$output;
}
?>