Download the PHP package ender/yunpian-sms without Composer

On this page you can find all versions of the php package ender/yunpian-sms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yunpian-sms

云片网络短信发送PHP SDK

Note: 依赖guzzlehttp/guzzle 6,安装本此包时会默认安装此依赖,可能很多其他的第三方库依赖较低版本的guzzle,如guzzle 5

这个SDK主要是对 云片网络 的HTTP短信发送相关API的PHP封装。

云片网络是目前比较靠谱的短信发送提供商,速度和价格都不错,由于自己项目中用到,顺便打了个包共享给大家。

Install

Via Composer

Usage

如果单独使用别忘了引入composer生成的autoload.php文件

如果是laravel用户可以不用手动include

使用此sdk之前别忘了先在云片网络官网注册并申请相应的apikey

示例代码如下

发送短信

获取当前账户余额等信息

构造函数参数即为你的个人的apikey

根据云片网络官方接口文档的分类,也对应的封装了三个Class:

分别对应 账户,模板,短信三部分功能,基本覆盖了所有接口。以下三个接口除外:

Note: 注意部分接口是高级接口,需要申请才能使用,具体可查阅官方文档

各个接口与本SDK中方法的对应关系基本上可以从名字上猜出来,很直观,实在猜不出来进入到方法里面可以看到对应的官方http接口。

返回值说明

所有接口返回php数组格式,最外层包括http status code 和云片网络的完整返回值两部分,以短信发送接口sendMsg返回值为例,格式如下:

data部分就是官方api的完整返回值,此处把json字符串转成了数组形式。

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email :author_email instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of yunpian-sms with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
guzzlehttp/guzzle Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ender/yunpian-sms contains the following files

Loading the files please wait ....