Return to Snippet

Revision: 72331
at July 18, 2017 23:04 by Broadnet

Initial Code
//PHP SMS API integration code 
//Your application url 
$ApiUrl ="ApiUrl";)

//Your User Id
$user ="user";

//Your password
$pass ="****";

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

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

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

// Message Type (1,2,3,4) 1- English,2-Unicode,3- Special Character,4-Arabic
$type = "type";

//Prepare parameter string
$url = "$ApiUrl?user=$user&pass=$pass&sid=$sid&mno=$mno&text=$text&type=$type";

//prepare connection
$ch = curl_init($url);

//reading response
$body = curl_exec($ch);

//finally close connection

//print response 
echo $body;

Initial URL

Initial Description
BroadNet Technologies furnishes you with a variety of PHP Sample SMS code examples and programming objects, and assist you in connecting to our gateway via the PHP script. Sending your messages via our designed PHP SMS Sample Code is easier than you guess!

Initial Title
Example of PHP Sample SMS code - Messaging API

Initial Tags
php, code, api

Initial Language