karbura/nexah-sms

This package allow you to send SMS to one or more number via the Nexah API

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

This package is auto-updated.

Last update: 2024-10-29 06:13:23 UTC


README

About

A PHP class, which implements the Nexah API to send SMS.

It focuses on sending messages via Nexah API, and returns a boolean according to the success or the failure of the send method inside the class.

To get a Nexah account and start using their API, visit nexah/contac-us. Once there, fulfill the contact form and submit. Once done, you will get an email and an amployee of Nexah will give you a call for your account configuration.

Requirements

Installation

Installation is recommended to be done via [composer][] by running:

composer require karbura/nexah-sms

Alternatively you can add the following to the require section in your composer.json manually:

"karbura/nexah-sms"

Run composer update afterwards.

Usage

// 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");

Thank you for using this extension and if there is any problem, feel free to report it.