API for Developers

Download API and Details

  • API Host/Domain
  • API User Name:
  • API Password:
  • API Guide for Developers Download:
    HTTP API EXAMPLE PHP EXAMPLE

PHP Example


<?php
$userName="Demo";
$Password="demo123";
$messg="Salam Yaseen";
$Masking="BizSMSsol";
$numb="923123174745";
$response=SAS_sendsms($userName,$Password,$messg,$Masking,strval($numb));
$val=strpos($response,Successfully);
if ($val>0)
{
echo "Done";
}
else
{
echo $response;
}

function SAS_sendsms($userName,$Password,$Message,$SenderId,$PhoneNumber)
{
$url = "https://api.sms.bizsmssol.com/Api.php?";
$fields = array(
'userName' => rawurlencode($userName),
'pass' => rawurlencode($Password),
'msg' => rawurlencode($Message),
'num' => rawurlencode($PhoneNumber),
'mask' => rawurlencode($SenderId)
); $fields_string = "";
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
$all=rtrim($fields_string, '&');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url.$all);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $all);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}?>