g4 / sms-gateway
sms-gateway php library
Installs: 9 554
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 10
Forks: 0
Open Issues: 0
Requires
- php: >=5.4
- twilio/sdk: 3.*
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-12-14 17:49:01 UTC
README
sms-gateway - php library
Install
Via Composer
composer require g4/sms-gateway
Usage
Send Message
require_once 'vendor/autoload.php'; // Twilio $account_sid = '[AccountSid]'; $auth_token = '[AuthToken]'; $driver = new \G4\SmsGateway\Adapter\Twilio($account_sid, $auth_token); $smsGateway = new \G4\SmsGateway\SmsGateway($driver); // \G4\SmsGateway\Message $message = $smsGateway ->from('+00000000000') ->to('+00000000000') ->send('Hello world!');
View Message
require_once __DIR__ . '/../../vendor/autoload.php'; // Twilio $account_sid = 'xxx'; $auth_token = 'xxx'; $driver = new \G4\SmsGateway\Adapter\Twilio($account_sid, $auth_token); $smsGateway = new \G4\SmsGateway\SmsGateway($driver); // \G4\SmsGateway\Message $message = $smsGateway->view('SMxxxxxxxxxxxxx');
Development
Install dependencies
$ make install
Run tests
$ make test
License
(The MIT License) see LICENSE file for details...