![]() ![]() ![]() $service->smsFeature()->sendSmss($smssBag) $smssBag = SendSmssBag::withMessage($receivers, 'Hello, receivers!') Easy-peasy, use the sendSmss function and SendSmssBag class.Īlternatively, create groups in the Contacts tab and send a bulk SMS campaign like this: $receivers = There’s a huge chance that your SMS communication will depend on delivering the same messages to many different recipients. $status – delivery status ( complete list and explanation).$dateSent – time of messaging, UNIX timestamp format.$points – message price presented as the points deducted from your SMSAPI account.The sendSms method returns the SMS object containing a bunch of helpful information: definition of a message body and recipient,Īdditional features of PHP SMS notifications.connection with the short message service,. ![]() In a nutshell, sending messages using the PHP is done in four simple steps: The withMessage factory method takes two string arguments: recipient phone number (plus country code) and message body. Find the practical example below: smsFeature()->sendSms($smsBag) Their properties are recipient or recipients, content, and other optional parameters. The “Bag” type objects determine elements of a text message. sendSmss(SendSmssBag $sendSmssBag) – send SMS messages to multiple contacts.sendSms(SendSmsBag $sendSmsBag) – send an SMS message to a single contact.The SmsFeature interface implements SMS messaging. Two simple lines (not counting the namespace calls) are enough to create SmsapiHttpClient and smsapiComService objects. Here’s how you can start: smsapiComService($apiToken) The PHP code allows you to use the provided libcurl library adapter, so you don’t have to implement your HTTP client-but if you wish, do so. As SMSAPI is a RESTfull API, you must set up an HTTP client to utilize its methods. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |