PHP code example of textme / sms

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

    

textme / sms example snippets


Textme\SMS::init($username, $password, $source = '(optinal)');

Textme\SMS::addMessage($numbers, $message, $source = '(optinal)');

$number = '0500000000';
$numners = ['0500000000','0500000001','0500000002'];
$numbers = ['phone'=> '0500000000', 'id' => '1'];
$numbers = [
             ['phone'=> '0500000000', 'id' => '1'],
             ['phone'=> '0500000001', 'id' => '2'],
];

$message = 'Your message here';
$message = [
            'template' => 'Your message here, yours {{var}} here',
            'var' => 'demo for var use',
];

Textme\SMS::addMessages($array);

$array = [
   'numbers' => '0500000000',
   'message' => 'test message',
];
$array  = [
             [
                'numbers' => '0500000000',
                'message' => 'test message',
             ],
             [
                'numbers' => '0500000001',
                'message' => 'test message 2',
             ],
];

Textme\SMS::getBalance();

Textme\SMS::getResponse();

$sms = new Textme\SMS($username, $password, $settings = ['(optinal)']);