neolikotsi/php-smsportal 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

neolikotsi/php-smsportal

最新稳定版本:1.0.13

Composer 安装命令:

composer require neolikotsi/php-smsportal

包简介

SMS Portal API for PHP

README 文档

README

SMS Portal API for PHP

Send SMS from your PHP client API powered by SMSPortal.

Installation

Install the composer package neolikotsi/php-smsportal

composer required neolikotsi/php-smsportal

Usage

Create an instance of NeoLikotsi\SMSPortal\RestClient and use it to hit the endpoints of the SMSPortal RESTful API

use NeoLikotsi\SMSPortal\Message;
use NeoLikotsi\SMSPortal\RestClient;

$apiId = 'YOUR CLIENT API ID';
$apiSecret = 'YOUR CLIENT SECRET';
$baseRestUri = 'https://rest.smsportal.com/v1/';

$client = new RestClient($apiId, $apiSecret, $baseRestUri);
$message = new Message('Hello World');

// send to /bulkmessages endpoint
$responseArray1 = $client->message()->send([
                    'messages' => [
                        [
                            'destination' => '1234567890'
                            'content' => $message->getContent(),
                        ]
                    ]
                ]);

// send to /groupmessages endpoint
$responseArray2 = $client->message()->sendToGroup([
                    'message' => $message->getContent(),
                    'groups' => ['BloemfonteinStores', 'BotshabeloStores'],
                ]);

Balance

You can check your SMS credit with the balance method.

$client->balance();

Test Mode (see api doc)

$client->message()->inTestMode()->send([
    'messages' => [
        [
            'destination' => '1234567890'
            'content' => $message->getContent(),
        ]
    ]
]);

For Laravel users see package

neolikotsi/laravel-smsportal

License

The MIT License (MIT). Please see License File for more information.

Sponsor

₿ BTC Wallet: 18YGRct3jRxkRyxsHG5ByLCkUef7MdXNMw

统计信息

  • 总下载量: 3.83k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 3
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-05-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固