定制 adisaf/vavasms-php-sdk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

adisaf/vavasms-php-sdk

Composer 安装命令:

composer require adisaf/vavasms-php-sdk

包简介

Client library to send SMS using Vavasms SMS Gateway API (https://vavasms.com)

README 文档

README

PHP client library to send SMS messages using Vavasms SMS Gateway.

To use this library, you must have a valid account on https://www.vavasms.com.

Please note SMS messages sent with this library will be deducted by your Vavasms account credits.

For any questions, please contact us at tech@vavasms.com

How to send a message

<?php
$vavasms_username = 'your_username'; // Please register on https://vavasms.com
$vavasms_password = 'your_password';
$sender = 'your_sender_id';
$recipients = '+22507070707';
$text = 'Hello World!';

$sms = new Adisaf\VavaSms\SMS();

try {
    $sms->setMessage($text)
        ->setSender($sender)
        ->setRecipients($recipients)
        ->authenticate($vavasms_username, $vavasms_password);
    $smsResult = $sms->send();
    if ($smsResult["message"] == "OPERATION_SUCCES") {
        $lotId = $smsResult["data"]["lot_id"];
        foreach ($smsResult["data"]["message_id"] as $i => $messageId) {
            echo "Message to {$recipients[$i]} has id {$messageId} <br>";
        }
    } else {
        echo "error : {$smsResult["message"]}";
    }
} catch (Exception $e) {
    var_dump($e->getMessage());
}

Installation

Composer (recommended)

Install it via composer (https://getcomposer.org/).

Other autoloaders

This package is PSR-4 compliant, so you can clone the repository in your project and a use PSR-4 compatible autoloader (e.g. Symfony or Laravel)

Manual installation

You can simply clone the repository into your project and use the classes contained in src/ directory.

Please check the examples directory here: https://github.com/adisaf/vavasms-php-sdk/tree/master/examples

More info

You can check out our website https://vavasms.com or contact us.

Contributing

If you wish to contribute to this project, please feel free to send us pull request. We'll be happy to check them out!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-06-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固