PHP API code for Sending SMS

Do you know – How to Send SMS to mobile from your website through PC using PHP API Code ?  

We will tell about it. Whether you are a developer, technocrat or a non-technocrat, you can easily integrate our Bulk SMS API into your software to Send SMS.

Send SMS to mobile phones from your website using API in PHP code is very easy with our Send Bulk SMS API and its source code. All you have to do is copy & paste the SMS API code & start texting in minutes.

We offer the most reliable, flexible and easily adaptable SMS API gateway. It can be integrated in minutes and offers a wide range of advantages. It could be used to send notifications, information, updates, OTP, marketing, promotions and much more.
PHP API for Sending SMS –

http://msg.msgclub.net/rest/services/sendSMS/sendGroupSms?AUTH_KEY=YourAuthKey&message=message&senderId=dddddd&routeId=1&mobileNos=9999999999&smsContentType=english

We offer a Bulk SMS API that is used to send SMS for this you just have to simply add SMS credits to Panel account and integrate the SMS sending functionality on your site.   

The API is also fully integrated with any software to easily manage your contacts and groups. As long as your software is connected to the internet, you can send SMS from it. We too provide full code in PHP language →

<?php


function sendsmsGET($mobileNumber,$senderId,$routeId,$message,$serverUrl,$authKey){
   $getData = ‘mobileNos=’.$mobileNumber.’&message=’.urlencode($message).’&senderId=’.$senderId.’&routeId=’.$routeId;
   //API URL   $url=”http://”.$serverUrl.”/rest/services/sendSMS/sendGroupSms?AUTH_KEY=”.$authKey.”&”.$getData;

   // init the resource   $ch = curl_init();   curl_setopt_array($ch, array(       CURLOPT_URL => $url,       CURLOPT_RETURNTRANSFER => true,       CURLOPT_SSL_VERIFYHOST => 0,       CURLOPT_SSL_VERIFYPEER => 0
   ));

   //get response   $output = curl_exec($ch);
   //Print error if any   if(curl_errno($ch))   {       echo ‘error:’ . curl_error($ch);   }
   curl_close($ch);
   return $output;}

function sendsmsPOST($mobileNumber,$senderId,$routeId,$message,$serverUrl,$authKey){
       //Prepare you post parameters   $postData = array(                   ‘mobileNumbers’ => $mobileNumber,               ‘smsContent’ => $message,       ‘senderId’ => $senderId,       ‘routeId’ => $routeId,              “smsContentType” =>’english’   );

   $data_json = json_encode($postData);

   $url=”http://”.$serverUrl.”/rest/services/sendSMS/sendGroupSms?AUTH_KEY=”.$authKey;

   // init the resource   $ch = curl_init();
   
   curl_setopt_array($ch, array(       CURLOPT_URL => $url,       CURLOPT_HTTPHEADER => array(‘Content-Type: application/json’,’Content-Length: ‘ . strlen($data_json)),       CURLOPT_RETURNTRANSFER => true,       CURLOPT_POST => true,       CURLOPT_POSTFIELDS => $data_json,       CURLOPT_SSL_VERIFYHOST => 0,       CURLOPT_SSL_VERIFYPEER => 0   ));
   //get response   $output = curl_exec($ch);
   //Print error if any   if(curl_errno($ch))   {       echo ‘error:’ . curl_error($ch);   }   curl_close($ch);   return $output;}


?>

The possibilities really are endless and our phenomenal technical support team are on hand to provide you with assistance every step of the way.

For more details Contact us here.