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

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

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

dash8x/dhiraagu-sms

最新稳定版本:v0.4.0

Composer 安装命令:

composer require dash8x/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

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固