smsbrana / sms-connect
Send and receive SMS with PHP
Installs: 39 077
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 5
Forks: 6
Open Issues: 0
Requires
- php: >=5.5.0
Requires (Dev)
- mockery/mockery: @stable
- nette/tester: @stable
- php-parallel-lint/php-parallel-lint: @stable
README
Send and receive SMS with PHP (for Czech Republic)
Installation
via composer:
$ composer require smsbrana/sms-connect
Usage
Inbox
use \Neogate\SmsConnect\SmsConnect; $smsConnect = new SmsConnect('<your_login>', '<secret_password>'); $smsConnect->getInbox();
Send SMS
use \Neogate\SmsConnect\SmsConnect; $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; }