sirolad/route-sms-php

Route SMS PHP Library

1.5.2 2018-05-03 11:00 UTC

This package is auto-updated.

Last update: 2024-10-29 05:10:38 UTC


README

RouteSMS PHP Library

A modular PHP library for interacting with RouteSMS.

######Installation You will need composer in other to use this library. Head over to Composer to get started.

composer require sirolad/route-sms-php

######Usage

use Sirolad\RouteSMS;

$sms = new RouteSMS($username, $password);

$result = $sms->send($sender, $recipient, $message, $type=0, $dlr=1);

return $result; //[{"status":"1701","recipient":"2348037XXXXXX","messageId":"fbf2f6bc-b708-4895-867b-3418cf62031d"}]

for Bulk sms it returns
[{"status":"1701","recipient":"2348037690966","messageId":"fbf2f6bc-b708-4895-867b-3418cf62031d"},{"status":"1702","recipient":"2348037690966","messageId":"fbf2f6bc-b708-4895-867b-3418cf62031d"},{"status":"1703","recipient":"2348037690966","messageId":"fbf2f6bc-b708-4895-867b-3418cf62031d"}]

If message is successful, you will get a success response else an exception will be thrown.

$type: Indicates the type of message. Values for "type":- 0: Plain Text (GSM 3.38 Character encoding) 1: Flash Message (GSM 3.38 Character encoding) 2: Unicode 3: Reserved 4: WAP Push 5: Plain Text (ISO-8859-1 Character encoding) 6: Unicode Flash 7: Flash Message (ISO-8859-1 Character encoding)

$dlr: Indicates whether the client wants delivery report for this message Range of values for "dlr":- 0: No Delivery report required 1: Delivery report required

$sender: The source address that should appear in the message Max Length of 18 if Only Numeric Max Length of 11 if Alpha numeric If you wish plus ('+') should be prefixed to the sender address when the message is displayed on the cell phone, please prefix the plus sign to your sender address while submitting the message (note the plus sign should be URL encoded). Additional restrictions on this field may be enforced by the SMSC.

For more information please consult the RouteSMS guide