Download the PHP package mlw/sms without Composer
On this page you can find all versions of the php package mlw/sms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor mlw
Package sms
Short Description MLW SMS library for integration with MlwSms SMS service.
License MIT
Package sms
Short Description MLW SMS library for integration with MlwSms SMS service.
License MIT
Please rate this library. Is it a good library?
Informations about the package sms
MlwSms PHP SDK
MlwSms PHP SDK 是一个 PHP 包,旨在简化与 MlwSms 短信服务的集成。此库封装了与 106 API 的交互,包括发送短信、查询状态等功能。
功能
- 发送短信: 支持发送验证码短信、群发短信和国际短信。
- 查询状态: 获取短信发送状态和回复列表。
安装
使用 Composer 安装此包:
配置
在使用前,你需要配置 Config 类来设置 API 密钥和基本 API URL。请参考以下示例:
使用 Config 类创建配置实例,设置你的 API 密钥和基本 API URL。然后创建 Request 实例,并用它们创建 MlwSmsClient 实例。最后,你可以通过 Application 类获取服务实例。
使用示例
发送验证码短信
使用 VerifyCodeService 服务的 send 方法发送验证码短信
请求参数
| 参数名 | 类型 | 必填 | 示例 | 说明 |
|---|---|---|---|---|
| mobile | String | 是 | 13900000000 | 接收短信的手机号码(只支持单个手机号)。 |
| content | String | 是 | 先生##9:40##快递公司##1234567 | 发送的短信内容是模板变量内容,多个变量中间用 ## 或 $$ 隔开,采用 UTF-8 编码。单个变量限制为 1-20 个字。 |
| sign | String | 是 | 【测试签名】 | 平台上申请的接口短信签名或者签名 ID(须审核通过),采用 UTF-8 编码。 |
| templateId | String | 是 | 123456 | 平台上申请的接口短信模板 ID(须审核通过)。 |
目录结构
All versions of sms with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.4
ext-curl Version *
ext-json Version *
ext-curl Version *
ext-json Version *
The package mlw/sms contains the following files
Loading the files please wait ...