karbura / nexah-sms
此包允许您通过Nexah API向一个或多个号码发送短信
dev-main
2022-12-29 16:11 UTC
Requires
- php: >=7.4
This package is auto-updated.
Last update: 2024-09-29 05:57:17 UTC
README
关于
它专注于通过Nexah API发送消息,并根据类内发送方法的成功或失败返回布尔值。
要获取Nexah账户并开始使用其API,请访问nexah/contac-us。到那里后,填写联系表格并提交。完成后,您将收到一封电子邮件,Nexah的员工将给您打电话以进行账户配置。
需求
- 您需要一个如上所述的账户 nexah/contac-us。
- 您的用户名和密码
- PHP 7.4或更高版本
安装
建议通过[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");
感谢您使用此扩展,如果您有任何问题,请随时报告。