Download the PHP package jmhc/sms without Composer

On this page you can find all versions of the php package jmhc/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 sms

介绍

目录

安装

简单使用

注意:

发送示例:

验证示例:

使用验证码示例:

SMS 类方法介绍

setPhone

设置发送短信的手机号(必须)

setType

设置发送类型

setCode

设置缓存的验证码

setMessage

设置发送消息(必须)

setGateways

设置发送网关,不设置使用配置的默认网关

setInterval

设置验证的发送间隔时间,不设置使用默认值

达到此次数或大于此次数需等待间隔时间后才能再次发送

setValidTime

设置验证码有效期(默认 1800 秒)

useCache

是否使用缓存(默认使用)

使用缓存时会验证发送间隔及记录验证码

send

发送消息(默认 false)

getEasySms

获取 easySms 实例

SmsCache 类方法介绍

setPhone

设置发送短信的手机号(必须)

setType

设置发送类型

setInterval

设置验证的发送间隔时间,不设置使用默认值

达到此次数或大于此次数需等待间隔时间后才能再次发送

setValidTime

设置验证码有效期(默认 1800 秒)

sendCheck

发送检测,不允许发送将会抛出 Jmhc\Sms\Exceptions\SmsException 异常

send

设置验证码缓存

verify

验证验证码是否正确,验证失败将会抛出 Jmhc\Sms\Exceptions\SmsException 异常

sendInterval

获取发送间隔时间

SmsException 错误码

错误码 描述 数据
401 手机号格式不正确 ['phone' => 13188888888 ]
402 发送消息必须 ---
403 发送间隔未到 ['phone' => 13188888888 , 'interval' => 58]
411 无效的验证码 ---
412 验证码不正确 ---
413 发送频繁 ---

All versions of sms with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
ext-json Version *
overtrue/easy-sms Version ^1.1
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 jmhc/sms contains the following files

Loading the files please wait ....