PHP Code

Check Bulk Balance


 <?php
//Disable caching of WSDL
ini_set("soap.wsdl_cache_enabled", "0"); 

//Declare your SMS Client
$SMS_CLIENT = new SoapClient("http://198.12.159.194/api/wsdl/send_message.wsdl");
$params["email"]="karoneybrian@gmail.com";
$params["user_id"]="A98SADSE";

$resp=$SMS_CLIENT->CheckBulkBalance($params);
echo $resp["credit_balance"];//display credit balance
?>

Send Bulk Message

 

 <?php
//Disable caching of WSDL
ini_set("soap.wsdl_cache_enabled", "0"); 

//Declare your SMS Client
$SMS_CLIENT = new SoapClient("http://198.12.159.194/api/wsdl/send_message.wsdl");


//Prepare your parameters
$params=array();
$params["user_id"]="1";
$params["service_id"]="3";
$params["message"]="This old man, he played three, he played knick knack on my knee.";
$params["recipient"]="254722140588";

$counter=0;//number of messages you would like to send

//Send Bulk SMS and assign the result to an array "response" in a loop through your contacts
while($counter>=10){
$response=$SMS_CLIENT->SendBulkMessage($params);
if($response->status=="1"){
echo $response->message; //display success message or proceed to process the user request
}else{
echo $response->message; //display error message or respond appropriately
}
$counter++;
}

?>

Send Premium Message


 <?php
//Disable caching of WSDL
ini_set("soap.wsdl_cache_enabled", "0"); 

//Declare your SMS Client
$SMS_CLIENT = new SoapClient("http://198.12.159.194/api/wsdl/send_message.wsdl");


//Prepare your parameters
$params=array();
$params["user_id"]="1";
$params["service_id"]="2";
$params["message"]="This old man, he played three, he played knick knack on my knee.";
$params["recipient"]="254720051988";

//Send Premium Rate SMS and assign the result to an array "response"
$response=$SMS_CLIENT->SendPremiumMessage($params);
if($response->status=="1"){
echo $response->message; //display success message or proceed to process the user request
}else{
echo $response->message; //display error message or respond appropriately
}

?>