PHP code example of secgin / phalcon-sms-plugin

1. Go to this page and download the library: Download secgin/phalcon-sms-plugin 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/ */

    

secgin / phalcon-sms-plugin example snippets


    // Netgsm
    new \Phalcon\Config([
        'sms' => [
            'username' => '...',
            'password' => '...',
            'header' => '...',
            'provider' => 'netgsm'
        ]
    ]);

    // Telsam
    new \Phalcon\Config([
        'sms' => [
            'username' => '...',
            'password' => '...',
            'sender' => '...',
            'title' => '...',
            'provider' => 'telsam'
        ]
    ]);

    $container->register(new \Phalcon\Sms\ClientProvider());

    $container->get('sms')->send(Deneme', ['0000000000']);

    $container->get('sms')->send(Deneme', ['0000000000', '0000000000']);

    $container
        ->get('sms')
        ->sendMultiple(
            [
                '0000000000' => 'Mesaj 1', 
                '0000000000' => 'Mesaj 2'
            ]
        );