PHP code example of orajo / zf-sms-zilla

1. Go to this page and download the library: Download orajo/zf-sms-zilla library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

orajo / zf-sms-zilla example snippets


'modules' => array(
  'Application',
  'ZfSmsZilla'
),

public function smsAction() {
  /**
   * @var \ZfSmsZilla\Service\SenderService
   */
  $smsService = $this->getServiceLocator()->get('ZfSmsZillaService');
  $smsService->send('Lorem ipsum 1', ['+41759987654']);
  $smsService->send('Lorem ipsum 2', ['605123456', '509546985']);
  
  // if you need more, e.g.
  $sender = $smsService->getSender();
  $errors = $sender->getAdapter()->getErrors();
  $sender->setValidator(new SmsZilla\Validator\LibphonenumberValidator('US'));
}