Лесно интегрирайте BsmsApp API във вашето уеб приложение с помощта на библиотеката cURL.
Send single SMS:
<?php $message = [ "secret" => "API_SECRET", // your API secret from (Tools -> API Keys) page "mode" => "devices", "device" => "00000000-0000-0000-d57d-f30cb6a89289", "sim" => 1, "priority" => 1, "phone" => "+40712034567", "message" => "Hello World!" ]; $cURL = curl_init("https://www.cloud.bsmsapp.com/api/send/sms"); curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true); curl_setopt($cURL, CURLOPT_POSTFIELDS, $message); $response = curl_exec($cURL); curl_close($cURL); $result = json_decode($response, true); // do something with response print_r($result);
Send bulk SMS:
<?php $message = [ "secret" => "API_SECRET", // your API secret from (Tools -> API Keys) page "mode" => "devices", "numbers" => "+35912034567,+90123456789,+49123456789", "groups" => "1,2,3,4", "device" => "00000000-0000-0000-4215-cd51ff52ff5dd59", "sim" => 1, "priority" => 1, "message" => "Hello World!" ]; $cURL = curl_init("https://www.cloud.bsmsapp.com/api/send/sms.bulk"); curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true); curl_setopt($cURL, CURLOPT_POSTFIELDS, $message); $response = curl_exec($cURL); curl_close($cURL); $result = json_decode($response, true); // do something with response print_r($result);
For detailed informations about how you can integrate your app with BsmsApp please check our API Documentation