undjike/cleansms
Composer 安装命令:
composer require undjike/cleansms
包简介
Send SMS and manage your CleanSMS account.
README 文档
README
Introduction
This PHP package enables you to easily send SMS using CleanSMS Service. It has an elegant syntax, and it is very easy to install and use.
Just few steps, and it's ready.
Create an account on CleanSMS, configure it and generate API Key. Then, let's start.
Installation
This package can be installed via composer. Just type :
composer require undjike/cleansms
This will download everything needed for the package to work in your project.
Usage
After installation, you can send SMS.
use Undjike\CleanSmsPhp\CleanSms; CleanSms::create() ->apiKey('SMS_API_KEY') ->email('YOUR_CLEANSMS_EMAIL') ->sendSms( 'MESSAGE_TO_SEND', 'RECEIVER_PHONE_NUMBER Phone number (Ex: "+237*****") or array of phone numbers (Ex: ["+237*****", "+245*****", ...])' ); /** Return true if the message is successfully sent, false if not. The response can be a JSON in some cases like 'no balance'. */
Note: RECEIVER_PHONE_NUMBER can be an array of valid phone numbers, or a string containing a single number.
You can query your account balance using this package.
use Undjike\CleanSmsPhp\CleanSms; CleanSms::create() ->apiKey('SMS_API_KEY') ->email('YOUR_CLEANSMS_EMAIL') ->getCredit(); /** Return the number of SMS remaining in your account. (Ex: 44) */
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-08-27