承接 saralsms/sdk-for-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

saralsms/sdk-for-php

Composer 安装命令:

composer require saralsms/sdk-for-php

包简介

SaralSMS SDK for the PHP programming language.

README 文档

README

The SaralSMS SDK for PHP makes it easy for developers to access SaralSMS API service in their PHP code, and build robust SMS based applications and software.

Getting Started

  1. Sign up for SaralSMS – Before you begin, you need to sign up for an SaralSMS account and retrieve your Credentials.
  2. Minimum requirements – To run the SDK, your system will need to meet the minimum requirements, including having PHP >= 7.2. We highly recommend having it compiled with the cURL extension and cURL compiled with a TLS backend (e.g., NSS or OpenSSL).

Installation

Install the SDK – Using Composer is the recommended way to install the SaralSMS SDK for PHP. The SDK is available via Packagist under the saralsms/sdk-for-php package.

composer require saralsms/sdk-for-php

Getting Help

We use the GitHub issues for tracking bugs and feature requests and address them as quickly as possible.

Quick Examples

Create a SaralSMS client

// require the composer autoloader.
require 'vendor/autoload.php';

use SaralSMS\Client;

// instantiate a SaralSMS client.
$client = new Client('f9c6......55c1');

Send Message

This will send the message to one or multiple numbers in an array.

$client->send(['9851xxx123', '9801xxx456'], 'This is test message from API.');

Sample Response

{
    "message": "2 messages queued for delivery."
}

Credits

This will return the available credits and total messages sent.

$client->getCredits();

Sample Response

{
  "credits": 6584,
  "total_sent": 3416
}

Reports

This will return historical messages reports including networks, charges and status.

$pageNumber = 1;
$client->getReports($pageNumber);

Sample Response

{
  "pages": 126,
  "data": [
    {
      "id": 56480058,
      "receiver": "9779851xxx123",
      "network": "ntc",
      "message": "Fruits are an excellent source of essential vitamins and minerals.",
      "api_credit": "1",
      "delivery_at": "2020-07-09 01:45:09"
    },
    {
      "id": 56480057,
      "receiver": "9779801xxx456",
      "network": "ncell",
      "message": "Vegetables are important sources of many nutrients, including potassium, dietary fiber.",
      "api_credit": "1",
      "delivery_at": "2020-07-08 07:25:31"
    }
  ]
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-12-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固