socialconnect/sms
最新稳定版本:0.1.1
Composer 安装命令:
composer require socialconnect/sms
包简介
Send SMS easy
README 文档
README
Supported providers
- Nexmo
- MessageBird
- SMS.RU
Installation
Add a requirement to your composer.json:
{
"require": {
"socialconnect/sms": "*"
}
}
Run the composer installer:
php composer.phar install
How to work
First, you need to setup ProviderFactory:
use SocialConnect\Common\Http\Client\Curl; use SocialConnect\SMS\ProviderFactory; include_once __DIR__ . '/vendor/autoload.php'; $service = new ProviderFactory( array( 'provider' => array( 'smsru' => array( 'appId' => 12345 ) ) ), new Curl() );
Next, you need to get provider:
/** @var \SocialConnect\SMS\Provider\SMSRU $provider */ $provider = $service->factory('smsru');
You can send sms:
$provider->send('+79999999', 'Hello, World!');
Or get balance:
var_dump($provider->getBalance());
License
This project is open-sourced software licensed under the MIT License.
See the LICENSE file for more information.
统计信息
- 总下载量: 87
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-05