定制 smsjuice/http-api-wrapper 二次开发

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

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

smsjuice/http-api-wrapper

Composer 安装命令:

composer require smsjuice/http-api-wrapper

包简介

Text Messaging wrapper for SMJuice HTTP API for PHP >=5.3

README 文档

README

SMSJuice HTTP API PHP Wrapper provides a clean way to connect to SMSJuice HTTP API servers. The main features in v1.0.0 are

  • Sending messages to single/multiple individual contacts
  • Sending messages to single/multiple groups on your SMSJuice account
  • Check for message reports for a certain message
  • Check account balance and/or remaining SMS credits
  • Add new groups with contacts to your SMSJuice account
  • Add new contacts (with names if needed) to existing groups on your SMSJuice account
  • Get a list of all the groups on your SMSJuice account
  • Get a list of all contacts from a given group on your SMSJuice account
  • Delete groups (with all the contacts contained in it )on your SMSJuice account
  • Delete contacts from a group on your SMSJuice account

Installation

1. Composer (Recommended way)

You can use Composer to install the SMSJuice HTTP API Wrapper. Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. To install composer follow instructions on https://getcomposer.org/doc/00-intro.md

After you install composer, use the following command in your commandline/shell to install the SMSJuice HTTP API wrapper.

$ composer require smsjuice/http-api-wrapper

...And you're good to go!

2. Download Zip

Download the Zip from https://www.smsjuice.com/text-messaging-api , and manually put it in a folder accessible from your project code.

Usage

When you are using the composer package structure then below is an example of the you could do:


$m = new Message("key", "secret"); //new message object with your key and secret
 //FROM address        
$m->setSender("Restaurant");
 //Recipient Type. Options - 'groups' OR 'numbers'. Default:'numbers'
$m->setRecipientType("numbers");
$m->setRecipientList(array("447900239984", "447900392828")); //add contacts
$m->addToRecipientList("447900385486"); //add one contact
$m->setMessage("Hello world"); //content to send
//Send the message and get the response from the server
$result = TextMessagingService::sendMessage($m);
//JSON Result from the server
echo $result;

License

APACHE2

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2016-08-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固