PHP code example of black-lamp / blcms-sms-mobizone

1. Go to this page and download the library: Download black-lamp/blcms-sms-mobizone 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/ */

    

black-lamp / blcms-sms-mobizone example snippets


    composer 

    "black-lamp/blcms-sms-mobizone": "*",

    'components' => [
        'sms' => [
                    'class' => bl\cms\sms\SmsMobizoneComponent::className(),
        
                    'apiToken' => '00000000000000000000000000000000000000000',
                    'recipientPhoneNumber' => '380965550000',
                    'smsText' => 'Default message',
                    'alphaName' => 'Name'
            ],
        ]

    $messageId = Yii::$app->sms->setSmsText('Some text')->send();

Yii::$app->sms->setApiToken(string $token);
Yii::$app->sms->setRecipientPhoneNumber(string $recipientPhoneNumber);
Yii::$app->sms->setSmsText(string $smsText);
Yii::$app->sms->setAlphaName(string $alphaName);

    $balance = Yii::$app->sms->getBalance();