spring-edge/php-sms-lib

该软件包最新版本(dev-master)没有提供许可证信息。

短信库,用于发送短信

dev-master 2021-05-09 05:36 UTC

This package is not auto-updated.

Last update: 2024-09-20 20:21:18 UTC


README

此仓库包含用于通过Spring Edge (https://www.springedge.com) API发送短信的PHP库

要求

  • 免费试用 消息账户
  • 在短信账户的开发者部分创建一个新的 apikey
  • 为短信账户设置发送者名称。
  • 一个可运行的PHP运行环境。

安装

smsapi.php 放置在同一目录下。获取API密钥和发送者名称。

用法

发送文本消息

include 'smsapi.php';

$apikey = "675031xxxxxxxxxxxx";
$sender = "SEDEMO";

$sendsms = new smsapi($apikey, $sender);
$sendsms->send_sms("9199xxxxxxxx", "Hello, This is a test message from spring edge");

成功响应

{
 "groupID":xxxxxx,
 "MessageIDs":"xxxxxxx-xx",
 "status":"AWAITED-DLR"
}

或者发生错误时

{
  "error":"Invalid Mobile Numbers"
}

支持

有关任何支持或查询,请访问:https://www.springedge.com