Friday, 7 August 2015

SMS Service(Api) Integration to website

04:47

(1)first go to website   & click on sign up  & register  there.

http://sms.ssdindia.com/


(2)they will send you your password through sms ..
(3)user your username & password & make login:

(4)then go to left hand side under IMPORTANT LINKS
CLICK ON   developer Tools(Api):

(5)then you will be redirected to  following links:

"http://sms.ssdindia.com/apidoc/"


(6)under that click on  "Text Sms"

(7)then fill given below form get Authetication key & Sample code for integrating Sms Api to your website ..






(8)then  use following sample code for testing:



<?php

//Your authentication key
$authKey = "YourAuthKey";

//Multiple mobiles numbers separated by comma
$mobileNumber = "9999999";

//Sender ID,While using route4 sender id should be 6 characters long.
$senderId = "102234";

//Your message to send, Add URL encoding here.
$message = urlencode("Test message");

//Define route 
$route = "default";
//Prepare you post parameters
$postData = array(
    'authkey' => $authKey,
    'mobiles' => $mobileNumber,
    'message' => $message,
    'sender' => $senderId,
    'route' => $route
);

//API URL
$url="http://sms.ssdindia.com/sendhttp.php";

// init the resource
$ch = curl_init();
curl_setopt_array($ch, array(
    CURLOPT_URL => $url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $postData
    //,CURLOPT_FOLLOWLOCATION => true
));


//Ignore SSL certificate verification
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, 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);

echo $output;
?>
Note: finally you will get sms which is given  & message=urlencode("testmessage");

Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

2 comments:

  1. This article is very helpful for me to work on Bulk sms by this info i can put my effort on PHP thanks for sharing the article.

    ReplyDelete
  2. This article is very useful. Thanks for sharing this site. Good information. Best PHP training in Bangalore

    ReplyDelete

PHP Training Mumbai, PHP MySQL Training Mumbai, PHP Course Mumbai, PHP Institute Mumbai

 

© 2013 PHP TRAINING IN MUMBAI BY OM SIR . All rights resevered. Designed by OM SIR

Back To Top