This PHP SMS Quickstart shows you how to use
<?php
$apikey = "YourAPIkey";
$apisender = "TESTIN";
$msg ="YOUR MESSAGE HERE";
$num = 91XXXXXXXXX; // MULTIPLE NUMBER VARIABLE PUT HERE...!
$ms = rawurlencode($msg); //This for encode your message content
$url = 'https://www.smsgatewayhub.com/api/mt/SendSMS?APIKey='.$apikey.'&senderid='.$apisender.'&channel=2&DCS=0&flashsms=0&number='.$num.'&text='.$ms.'&route=1';
//echo $url;
$ch=curl_init($url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,"");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,2);
$data = curl_exec($ch);
echo '
';
print($data); /* result of API call*/
?>
for any kind of help please drop mail us at : [email protected]
Search Knowledge Base Articles
PHP Sample Code Send BULK SMS
Did you find this article useful?
Related Articles
-
SMS API paramete info
https://www.smsgatewayhub.com/api/mt/SendSMS? Parameter Info Parameter Name Description Acc... -
C# Sample Code Send BULK SMS
This C# SMS Quickstart shows you how to useusing Systemusing Systemusing System.IOusing System.Netus... -
How do I add a line break in my SMS message?
API You can use the official REST API documentation for SMSGATEWAYHUB and search Send SMS,...