Malath SMS API for PHP Composer
, (*1)
Installation
composer require vzool/malath_sms
Extension: ext-curl is required., (*2)
Usage
Add sender
$DTT_SMS = new Vzool/Malath/Malath_SMS($UserName, $Password, 'UTF-8');
$Send = $DTT_SMS->AddSender($Name);
Check UserName & Password
$DTT_SMS = new Vzool/Malath/Malath_SMS($UserName, $Password, 'UTF-8');
$CheckUser = $DTT_SMS->CheckUserPassword();
Send SMS
$DTT_SMS = new Vzool/Malath/Malath_SMS($UserName, $Password, 'UTF-8');
$Send = $DTT_SMS->Send_SMS($Mobiles, $Originator, $SMS_Msg);
HTTP Request Documentation:
- Description â Bulk SMS.
- HTTP Connectivity.
- History.
- SMS Specifications.
- HTTP URLs.
a. Check User Name and Password., (*3)
b. Sending Process - Single & Multiple Messages URL., (*4)
c. Balance query., (*5)
d. Send Scheduled Message., (*6)
e. Insert Main Group., (*7)
f. Insert Sub Group., (*8)
g. Add Contact to Group., (*9)
h. add sender name., (*10)
I. Review sender name., (*11)
Bulk SMS
In an era of rapid technological advancements, mode of, (*12)
communication is becoming lot more sophisticated. A new and, (*13)
modern way of reaching your target market and communicating, (*14)
them is through SMS (Short Messaging Service). Malath SMS, (*15)
offers you this mode of communication through its bulk SMS, (*16)
service., (*17)
Bulk SMS service reaches your target audience at a very, (*18)
economical price, putting behind the conventional mode of, (*19)
advertising that costs you in multiples compared to SMS service., (*20)
High Speed messaging in world, yet simple and reliable. We provide, (*21)
you the fastest messaging solutions allowing the organizations to, (*22)
communicate with their clients on urgent and personal basis., (*23)
HTTP Connectivity
This document covers the HTTP method of connectivity. Additional, (*24)
documents are available for other types of connectivity., (*25)
This is one of the simpler server-based forms of communication to, (*26)
with our gateway. It can be used either in the form of a HTTP POST, (*27)
or as an URL. We recommend POST for larger data transfer, due, (*28)
to the size limitation of GET., (*29)
Communication to our API can be done via HTTP on port 80. All, (*30)
calls to the API must be URL-encoded., (*31)
The beauty and add-on advantage of http connectivity is that you, (*32)
can check or access the gateway even on web based applications., (*33)
The parameter names are case-sensitive, so it is important to read, (*34)
entire document prior to seeking assistance from IBS., (*35)
History, (*36)
This part of URL deals with the messages history and that, (*37)
includes the messages delivered and outstanding. The beauty and, (*38)
add-on advantage of http connectivity is that you can check or, (*39)
access the gateway even on web based applications., (*40)
Login to http://sms.malath.net.sa to history. You can check, (*41)
whether messages are delivered or outstanding., (*42)
SMS Specifications, (*43)
Unicode:, (*44)
Single Message: A message in Unicode format can contain up to, (*45)
70 characters., (*46)
Multiple Message: Once the message exceeds more than 70, (*47)
characters it would be sent in multiples with 67 characters in each, (*48)
message., (*49)
English:, (*50)
Single Message: A message in English format can contain up to, (*51)
160 characters., (*52)
Multiple Message: Once the message exceeds more than 160, (*53)
characters it would be sent in multiples with 134 characters in, (*54)
each message., (*55)
HTTP URLS
A- Check User Name and Password
You can check your user name and password from API., (*56)
URL for Check User Name and Password
http://sms.malath.net.sa/apis/users.aspx?code=1&username=xxxx&password=xxxx
Return Codes, (*57)
3101
Success
3102
Wrong Password
3103
User Name Donât Exist
3104
Account Inactive
3105
Missing Parameter
B- Sending Process:, (*58)
Unicode:, (*59)
URL for Single SMS service
http://sms.malath.net.sa/httpSmsProvider.aspx?username=xxxxxx&password=xxxxxx&mobile= 9665 x
xxxxx&unicode=U&message=062A062C
0020062C064806270644&sender=your sender name here
URL for Multiple SMS service
http://sms.malath.net.sa/httpSmsProvider.aspx?username=xxxxxx&password=xxxxxx&mobile=9665x
xxxxx,9665xxxxxx&unicode=U&message=062A062C
8064206390020062C064806270644&sender=your sender name here
In this URL for sending on multiple mobile you have to separate with comma(,)
Note: must be active your sender name before do any test., (*60)
English:, (*61)
URL for Single SMS service
[http://sms.malath.net.sa/httpSmsProvider.aspx?username=xxxxxx&password=xxxxxx&mobile=9665xxxxxx&unicode=E&message=test from Malath sms&sender=your sender name here](http://sms.malath.net.sa/httpSmsProvider.aspx?username=xxxxxx&password=xxxxxx&mobile=9665xxxxxx&unicode=E&message=test from Malath sms&sender=your sender name here), (*62)
URL for Multiple SMS service
[http://sms.malath.net.sa/httpSmsProvider.aspx?username=xxxxxx&password=xxxxxx&mobile=9665xxxxxx,9665xxxxxx&unicode=E&message= test from Malath sms&sender=your sender name here](http://sms.malath.net.sa/httpSmsProvider.aspx?username=xxxxxx&password=xxxxxx&mobile=9665xxxxxx,9665xxxxxx&unicode=E&message= test from Malath sms&sender=your sender name here), (*63)
In this URL for sending on multiple mobile you have to separate with comma(,), (*64)
Note: must be active your sender name before do any test., (*65)
HTTP Parameters
Username: This is your account username given by Malath SMS, (*66)
Password: this is password of your account Mobile: This is, (*67)
recipient mobile number. Format should be like 9665xxxxxx, (*68)
Unicode: This is the code which represents type of message. The, (*69)
values will be E for English, U for Unicode. Describe...., (*70)
Message: Actual message. If this English it will be English. For, (*71)
sending Unicode, you need to convert into hexacode., (*72)
Sender: This is sender address. This can be only in English and only, (*73)
up to 11characters., (*74)
Return Codes, (*75)
0
Success
101
Parameter are missing
104
either user name or password are missing or your Account is on hold
105
Credit are not available
106
wrong Unicode
107
blocked sender name
108
missing sender name
C- Balance query:, (*76)
If you want to know your balance after sending SMS, you can follow, (*77)
these steps:, (*78)
1 - Replace the variables in this following link with the suitable, (*79)
values, and then open it via the browser or any other programming, (*80)
language., (*81)
URL for Balance Query service
http://sms.malath.net.sa/api/getBalance.aspx?username=xxxxxx&password=xxxxxxxx, (*82)
Return Codes, (*83)
Error~
There is a wrong content in the link, (*84)
Error~
You have not a permission to or your account info is incorrect, (*85)
D- Send Scheduled Message:, (*86)
Send Scheduled Message the formate of date and time, (*87)
date=25/12/2010 , time=18:00 , unicode = U for unicode arabic, (*88)
and E for English, (*89)
URL for Send Scheduled Message service in English
http://sms.malath.net.sa/apis/users.aspx?code=8&username=xxxx&password=xxxx&
mobile=9665xxxxxx&sender=SMS&Date= 28 / 12 /2011&Time=13:00&message=Hi&u
nicode=E, (*90)
URL for Send Scheduled Message service in ARABIC
http://sms.malath.net.sa/apis/users.aspx?code=8&username=xxxxx&password=xxx&
mobile=9665xxxxxx&sender=SMS&Date= 28 / 12 /2011&Time=13:00&message=062A
062C063106280647002006450646002006450648064206390020062C064806270644&unicode=U, (*91)
In this URL for sending on multiple mobile you have to separate with comma(,)
Note: must be active your sender name before do any test., (*92)
Return Codes, (*93)
Success 3101
Parameter are missing 101
either user name or password are missing or your Account is on hold 104
Credit are not available 105
wrong Unicode 106
blocked sender name 107
missing sender name 108
Block Keyword 109
E- Insert Main Group:
Add Main Group in your Account throw API.
URL for Add Main Group
[http://sms.malath.net.sa/apis/users.aspx?code=4&username=xxxx&password=xxxx&](http://sms.malath.net.sa/apis/users.aspx?code=4&username=xxxx&password=xxxx&)
main=MainGroupname
Return Codes
3101
Success
### 3102
Wrong Password
### 3103
User Name Donât Exist
### 3104
Account Inactive
### 3105
Missing Parameter
### 3911
Add Group Successive
Add Group Failed 3914
F- Insert Sub Group:, (*94)
Add Sub Group in your Account throw API., (*95)
URL for Add Sub Group
http://sms.malath.net.sa/apis/users.aspx?code=5&username=xxxx&password=xxxx&
main=MainGroupID&sub=SubGroupName, (*96)
Return Codes, (*97)
3101
Success
3102
Wrong Password
3103
User Name Donât Exist
3104
Account Inactive
3105
Missing Parameter
3911
Add Group Successive
Add Group Failed 3914
Wrong Main Group 3913
G- Add Contact to Group:, (*98)
You can add Contact to your group easily throw API., (*99)
URL for Add Contact to Group
http://sms.malath.net.sa/apis/users.aspx?code=6&username=xxxx&password=xxxx&
name=Ahmad,Subhi,Khaled&number=9665555xxx,96659787xxx,9665554544xxx&s
ub=, (*100)
Return Codes, (*101)
3101
Success
3102
Wrong Password
3103
User Name Donât Exist
3104
Account Inactive
3105
Missing Parameter
3333
Missing Contact Number Or Contact Name
H - Add Sender Name:, (*102)
You can add Sender name to your account easily throw API., (*103)
URL for Check User Name and Password
http://sms.malath.net.sa/apis/users.aspx?code= 2 &username=xxx&password=xxxx&
newsender=xxxxxx
Return Codes, (*104)
Success 3101
Wrong Password 3102
User Name Donât Exist 3103
Account Inactive 3104
Missing Parameter 3105
Sender Name Violation Rule 443
Time Out Operation 3405
Sender Name Received 143
Sender Name exist 444
I - Review Sender Names:
You can Review your Sender name easily throw API., (*105)
URL for Check User Name and Password
http://sms.malath.net.sa/apis/users.aspx?code= 9 &username=xxx&password=xxx
Return Codes, (*106)
Review
Success (^) senders
Wrong Password 3102
User Name Donât Exist 3103
Account Inactive 3104
Missing Parameter 3105
Time Out Operation 3405, (*107)
END