Sms Roaming HTTP
Sms Roaming HTTP
Sms Roaming HTTP
com
admin@smsroaming.com
0. Introduction
The SMSRoaming system offers various methods of sending and receiving SMS messages.
This document contains specifications for the following methods:
Notes:
$username="xxxxx"; //Provide your smsroaming username
$password="xxxxx"; //Provide your smsroaming account password
$chkbal="0"; //if you want to just check your balance. send 1
$code="xxx"; //Enter Country Code (For Example 61 for Australia)
$number="xxxxxxxx"; //Enter mobile number without Country Code
$msg="I am testing Api"; //your Message
$msg=rawurlencode($msg); //if you will remove this line...you can't send special characters
like +$%^^& etc
$sender="xxxxx"; //Your Required Sender ID (SMS Masking)
www.smsroaming.com
admin@smsroaming.com
require_once('include/smsroamingAPI.php');
$chk=sendSMS("username","password","code","mobile","Your Message");
Function will return following values which you can use to check status of your message you just sent.
echo chkBAL("username","password");
If you are a Corporate User you can send your message with Open Sender ID:
For Example:
Step 2: Call a function to get all sms providing your username and password
i-e $getData = getMsgs("username","password");
Step 3: after this you have to decode data using this function
$data=json_decode($getData);
for($i=0;$i<count($data);$i++)
{
echo "<strong>Message</strong>: ".$data[$i]->msg."<br/>";
echo "<strong>Source</strong>: ".$data[$i]->src."<br/>";
echo "<strong>Date</strong>: ".$data[$i]->date."<br/>";
echo "<strong>Contact Name</strong>: ".$data[$i]->name."<br/>";
echo "<br/><br/>";
}
Step 5: after getting all your messages and after Reading/Storing them you should have to call a
function which will mark these sms as Read so in next call you will not get these messages.
getMsgsDone("username","password");
if($getData==-1)
die("Invalid Username/Password or Unable to connect Server");