shxfee/dhiraagu-sms 问题修复 & 功能扩展

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

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

shxfee/dhiraagu-sms

最新稳定版本:v0.4.0

Composer 安装命令:

composer require shxfee/dhiraagu-sms

包简介

PHP SDK for Dhiraagu Bulk SMS Gateway

README 文档

README

Latest Version on Packagist Software License Build Status StyleCI SensioLabsInsight Quality Score Code Coverage Total Downloads

PHP SDK for Dhiraagu Bulk SMS Gateway

Installation

You can install dhiraagu-sms via composer or by downloading the source.

Via Composer:

composer require dash8x/dhiraagu-sms

Quickstart

Send an SMS

// Send an SMS using Dhiraagu Bulk SMS Gateway and PHP
<?php
$username = "XXXXXXX"; // The username that you received from Dhiraagu (usually same as your SMS sender name)
$password = "YYYYYY"; // Your Dhiraagu Bulk SMS Gateway password
$url = 'https://bulksms.dhiraagu.com.mv/partners/xmlMessage.jsp'; // The Dhiraagu API endpoint. Leave blank to use the default URL. 

$client = new \Dash8x\DhiraaguSms\DhiraaguSms($username, $password, $url);
$message = $client->send(
  '+9607777777', // Text this number, use an array to send to multiple numbers
  'Hello World!' // Your message
);

print $message->message_id;

Check SMS Delivery Status

To check the delivery status of an SMS, first you will need to obtain the message_key and message_id when you send the SMS.

// Check the delivery status of an SMS using Dhiraagu Bulk SMS Gateway and PHP
<?php
$username = "XXXXXXX"; // The username that you received from Dhiraagu (usually same as your SMS sender name)
$password = "YYYYYY"; // Your Dhiraagu Bulk SMS Gateway password

$client = new \Dash8x\DhiraaguSms\DhiraaguSms($username, $password);
$message = $client->send(
  '+9607777777', // Text this number, use an array to send to multiple numbers
  'Hello World!' // Your message
);

$delivery = $client->delivery(
  $message->message_id, // Message id
  $message->message_key // Message key
);

print $delivery->message_status_desc;

// Check the status for a particular recipient
$device = $delivery->getDevice('9607777777'); // Omit the + of the country code
print $device->status_desc;

Demo

A demo implementation of this package can be found here.

Credits

Disclaimer

This package is not in any way officially affiliated with Dhiraagu. The "Dhiraagu" name has been used under fair use.

License

This Dhiraagu Bulk SMS Gateway SDK is open-sourced software licensed under the MIT license

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-26