//Rextester.Program.Main is the entry point for your code. Don't change it.
//Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Web;
using System.IO;
using System.Net;
using System.Text;
namespace Rextester
{
public class Program
{
public static void Main(string[] args)
{
//Your code goes here
Console.WriteLine("Hello, world!");
// If https is not working for you so please change it to http
String url="https://secure.h3techs.com/sms/api/send.php";
String result = "";
String to = "92333xxxxxxx";
String masking = HttpUtility.UrlEncode("99095");
String message = HttpUtility.UrlEncode("Hello this is a test message");
String strPost = "email=hello@brandedsmspakistan.com&key=11b0497be3267d50b36ed86d63e098fffe&mask="+ masking +"&to=" + to +"&message=" + message;
StreamWriter myWriter = null;
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Method = "POST";
objRequest.ContentLength = Encoding.UTF8.GetByteCount(strPost);
objRequest.ContentType = "application/x-www-form-urlencoded";
try
{
myWriter = new StreamWriter(objRequest.GetRequestStream());
myWriter.Write(strPost);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
finally
{
myWriter.Close();
}
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))
{
result = sr.ReadToEnd();
// Close and clean up the StreamReader
sr.Close();
}
Console.WriteLine(result);
}
}
}
Our SDKs and APIs have been thoroughly tested! Choose your programming language and we’ll adapt. We’re here to make your order verification system smoother & easier. Our easy-to-read developer manuals and tutorials will help you set up in no time! Our SDKs and APIs have been thoroughly tested! Choose your programming language and we’ll adapt. We’re here to make your order verification system smoother & easier. Our easy-to-read developer manuals and tutorials will help you set up in no time! The process
API Integration
API Integration
A few lines of code to get your brand grow bigger & better
// Confedential Configuration Variables / Mandatory Variables
$email = "hello@brandedsmspakistan.com";
$key = "0435gj23a24o20ak0dak29gje9d6b82618aa";
$mask = "H3 TECHS";
$to = "923151231015";
$message = "Test Message";
// Preparing Data to POST Request / DO NOT TOUCH BELOW
$mask = urlencode($mask);
$message = urlencode($message);
$data = "email=".$email."&key=".$key."&mask=".$mask."&to=".$to."&message=".$message;
// Sending the POST Request with cURL to Branded SMS Pakistan Server
$ch = curl_init('https://secure.h3techs.com/sms/api/send');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch); // Result from Branded SMS Pakistan including Return ID
curl_close($ch);
Coming Soon...
The process
API Integration
API Integration
A few lines of code to get your brand grow bigger better
//Rextester.Program.Main is the entry point for your code. Don't change it.
//Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Web;
using System.IO;
using System.Net;
using System.Text;
namespace Rextester
{
public class Program
{
public static void Main(string[] args)
{
//Your code goes here
Console.WriteLine("Hello, world!");
// If https is not working for you so please change it to http
String url="https://secure.h3techs.com/sms/api/send.php";
String result = "";
String to = "92333xxxxxxx";
String masking = HttpUtility.UrlEncode("99095");
String message = HttpUtility.UrlEncode("Hello this is a test message");
String strPost = "email=hello@brandedsmspakistan.com&key=11b0497be3267d50b36ed86d63e098fffe&mask="+ masking +"&to=" + to +"&message=" + message;
StreamWriter myWriter = null;
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Method = "POST";
objRequest.ContentLength = Encoding.UTF8.GetByteCount(strPost);
objRequest.ContentType = "application/x-www-form-urlencoded";
try
{
myWriter = new StreamWriter(objRequest.GetRequestStream());
myWriter.Write(strPost);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
finally
{
myWriter.Close();
}
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))
{
result = sr.ReadToEnd();
// Close and clean up the StreamReader
sr.Close();
}
Console.WriteLine(result);
}
}
}
// Confedential Configuration Variables / Mandatory Variables
$email = "hello@brandedsmspakistan.com";
$key = "0435gj23a24o20ak0dak29gje9d6b82618aa";
$mask = "H3 TECHS";
$to = "923151231015";
$message = "Test Message";
// Preparing Data to POST Request / DO NOT TOUCH BELOW
$mask = urlencode($mask);
$message = urlencode($message);
$data = "email=".$email."&key=".$key."&mask=".$mask."&to=".$to."&message=".$message;
// Sending the POST Request with cURL to Branded SMS Pakistan Server
$ch = curl_init('https://secure.h3techs.com/sms/api/send');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch); // Result from Branded SMS Pakistan including Return ID
curl_close($ch);
Coming Soon...