th3mouk / free-mobile-sms-cli
使用Free Mobile SMS通知API发送手机免费短信的PHP客户端。
1.1.1
2016-08-25 15:03 UTC
Requires
- php: ^5.6 || ^7.0
- guzzlehttp/guzzle: ^6.2.1
Requires (Dev)
- phpunit/phpunit: ^5.4.3
- sllh/php-cs-fixer-styleci-bridge: ^2.1
This package is auto-updated.
Last update: 2024-08-26 02:18:14 UTC
README
此库提供了一种客户端,可以通过[Free Mobile](http://mobile .free.fr/) API在您的手机上发送短信通知。
安装
Composer
composer require th3mouk/free-mobile-sms-cli ^1.0
Free Mobile
进入您的客户区域。
点击:管理我的账户 > 我的选项 > 短信通知 > 启用选项
现在您已经有了认证密钥。
使用方法
客户端
use Th3Mouk\FreeMobileSMSNotif\Client; $login = 'test'; $pass = 'test'; $freeMobileClient = new Client($login, $pass); $response = $freeMobileClient->send('Test Message');
响应代码
$response = $freeMobileClient->sendMessage('Test Message'); $code = $response->getStatusCode();
- 200: 短信已发送
- 400: 缺少参数
- 402: 短信发送过多,时间过短
- 403: 服务在您的客户区域未激活,或登录/密码错误
- 500: 服务器错误。请稍后重试。
请
随时改进此库。