smsbrana/sms-connect

Send and receive SMS with PHP

v0.3.7.1 2018-11-30 08:20 UTC

README

687474703a2f2f7777772e736d736272616e612e637a2f696d616765732f6c6f676f2e706e67

Send and receive SMS with PHP (for Czech Republic)

Registration

Installation

via composer:

$ composer require smsbrana/sms-connect

Usage

Inbox

$smsConnect = new SmsConnect('<your_login>', '<secret_password>');
$smsConnect->getInbox();

Send SMS

$smsConnect = new SmsConnect('<your_login>', '<secret_password>');
$smsConnect->sendSms('<phone_number>', '<text_sms>');

Send bulk

$smsConnect->addRecipient('<phone_number>', '<text_sms>');
$smsConnect->addRecipient('<another_number>', '<another_sms>');
$smsConnect->sendBulk();

Using as extension in Nette Framework

config.neon

extensions:
	smsconnect: Neogate\SmsConnect\SmsConnectExtension

config.local.neon

smsconnect:
	login: 'your_login'
	password: 'secret_password'

finally inject extension

/** @var SmsConnect */
private $smsConnect;

public function injectSmsConnectExtension(SmsConnect $smsConnect)
{
    $this->smsConnect = $smsConnect;
}