//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 developer-friendly SMS APIs make it simple for you to integrate and communicate effectively within your applications and systems. Our developer-friendly SMS APIs make it simple for you to integrate and communicate effectively within your applications and systems. Our SMS APIs ensure global compliance, making it easy to meet regulatory requirements for communication. With our SMS APIs, you can connect with customers around the world, expanding your reach. Experience quick and efficient communication with our SMS APIs, delivering messages fast. Choose a pre-built header or create a custom layout that perfectly suits your needs. It’s easy, fast and mobile-friendly. Quickly set up your brand with our developer manuals and tutorials, effortlessly enhancing growth through easy integration of our developer-friendly SMS APIs. Expand your brand’s reach and impact with simple API integration, supporting various programming languages, using just a few lines of code. 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! Developers
Developer-Friendly SMS APIs
Developers
Developer-Friendly SMS APIs
Compliance Made Easy
Reach a Wider Audience
Fast and Efficient Messaging
Our Codding Languages
Our Codding Languages
SMS API Gateway Features
The process
API Integration
API Integration
Enhance Your Brand’s Growth with Just a Few Lines of Code
// 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...
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...
Create and edit tasks online. For free.