karbura/nexah-sms

此包允许您通过Nexah API向一个或多个号码发送短信

安装: 0

依赖项: 0

建议者: 0

安全性: 0

星标: 0

关注者: 1

分支: 1

开放性问题: 0

类型:php-module

dev-main 2022-12-29 16:11 UTC

This package is auto-updated.

Last update: 2024-09-29 05:57:17 UTC


README

关于

这是一个PHP类,实现了发送短信的Nexah API。

它专注于通过Nexah API发送消息,并根据类内发送方法的成功或失败返回布尔值。

要获取Nexah账户并开始使用其API,请访问nexah/contac-us。到那里后,填写联系表格并提交。完成后,您将收到一封电子邮件,Nexah的员工将给您打电话以进行账户配置。

需求

安装

建议通过[composer][]运行安装

composer require karbura/nexah-sms

或者您可以在您的composer.json文件的手动添加以下内容到require部分

"karbura/nexah-sms"

之后运行composer update

使用方法

// Instantiate the Nexahsms class into the file where you want to send and SMS
$sms = new NexahSMS();

//  In the NexahSMS class, there is a method send_sms()
//  this method takes as parameters:
//  $user = your login received by Nexah team
//  $password = your login password received by Nexah team
//  $senderid = your name
//  $sms = the message to be sent
//  $mobiles = a number in string format or a coma seperated string of numbers to receive the message
$sms->send_sms($user, $password, $senderid, $sms, $modiles);

//  An example of this is the following
$sms->send_sms("myloginemail@email.com", "myloginpassword", "My Name", "My message here", "xxxxxxxxx, xxxxxxxxx, xxxxxxxxx");

感谢您使用此扩展,如果您有任何问题,请随时报告。