PHP Classes

PHP SMSC.ua Message Sender: Send SMS, MMS, EMail, Viber, Voicemail with SMSC

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 147 All time: 9,123 This week: 140Up
Version License PHP version Categories
smsc-ua-sms-sender 1.0.0The PHP License5.5Email, PHP 5, Wireless and Mobile, Li...
Description 

Author

This class can send SMS, MMS, EMail, Viber, Voicemail with SMSC.

It extends the CakePHP component and can send HTTP requests to the SMSC.UA API on behalf of given user and password to send messages to the different supported medium.

The class returns the API response to the calling application.

Picture of Roman Kozin
  Performance   Level  
Name: Roman Kozin is available for providing paid consulting. Contact Roman Kozin .
Classes: 8 packages by
Country: Ukraine Ukraine
Age: 29
All time rank: 270745 in Ukraine Ukraine
Week rank: 214 Up2 in Ukraine Ukraine Up
Innovation award
Innovation award
Nominee: 3x

Winner: 2x

Documentation

How to install this package?

composer require kield-01/smsc-ua-sms-sender dev-master to use current version

What You need to have to use this package?

  • CakePHP 3.3.x

After You require this package, it will install fabpot/goutte package

How to set up this component?

There is 2 options, how to initialize

Option 1

Set up credentials key in config/app.php:

    'smsc_ua' => [
        'login' => '__LOGIN__',
        'psw' => '__PASSWORD__'
    ]

Option 2

Set up credentials after loading component:

    use Cake\Controller\Component\SmscUaComponent;

    /
    * Class X
    *
    * @property SmscUaComponent $SmscUa
    /
    class X extends AppController
    {
    
        public function initialize(){
               $this->loadComponent('SmscUa');
               
               $this->SmscUa
                   ->setLogin('__LOGIN__')
                   ->setPassword('__PASSWORD__');
                   
                /OR/
                
                $this->SmscUa
                    ->setArgument('login', '__LOGIN__')
                    ->setArgument('psw', '__PASSWORD__');
        }
        
    }

API

/Allows You to add one number to current numbers list/
$this->SmscUa->setNumbers('380666666666');

/Allows You to add bulk to current numbers list/
$this->SmscUa->setNumbers(['380666666666', '380666666667']);

/Allows You to set message Text/
$this->SmscUa->setMessageBody('Random text');

/Allows You to change Response format/
$this->SmscUa->setResponseFormat('string'); // Response as string data
$this->SmscUa->setResponseFormat('digits'); // Response as digits, separated by ','
$this->SmscUa->setResponseFormat('xml');    // Response as XML Document
$this->SmscUa->setResponseFormat('json');   // Response as JSON Object

/Sending methods/
$this->SmscUa->sendPlainTextSMS(); // Sending simple SMS

  Files folder image Files (4)  
File Role Description
Files folder imagedata (1 file)
Files folder imagesrc (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (4)  /  data  
File Role Description
  Accessible without login Plain text file rules.php Aux. Auxiliary script

  Files folder image Files (4)  /  src  
File Role Description
Files folder imageController (1 directory)

  Files folder image Files (4)  /  src  /  Controller  
File Role Description
Files folder imageComponent (1 file)

  Files folder image Files (4)  /  src  /  Controller  /  Component  
File Role Description
  Plain text file SmscUaComponent.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:147
This week:0
All time:9,123
This week:140Up