Web Station has been enabled. To finish setting up your website, please see the "Web Service" section of DSM Help.
"+66876667101",
"from" => "0999066966",
"text" => "A text message",
"apiKey" => "77499c50-13ef-4fa2-a2ca-2645bd3da964",
"apiSecret" => "353809dd-baaa-4293-9ac6-24763308341e"
);
$data_string = json_encode($data);
$ch = curl_init('https://api.apitel.co/sms');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string))
);
$result = curl_exec($ch);
$http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
if ( $http_code == "200" ){
echo 'Successful! Server responded with:'.$result;
}else{
echo 'Failed! Server responded with:'.$result;
}
curl_close( $ch );
?>
"+66876667101",
"from" => "0999066966",
"text" => "A text message",
"apiKey" => "77499c50-13ef-4fa2-a2ca-2645bd3da964",
"apiSecret" => "353809dd-baaa-4293-9ac6-24763308341e"
);
$data_string = json_encode($data);
$ch = curl_init('https://api.apitel.co/sms');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string))
);
$result = curl_exec($ch);
$http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
if ( $http_code == "200" ){
echo 'Successful! Server responded with:'.$result;
}else{
echo 'Failed! Server responded with:'.$result;
}
curl_close( $ch );
?>