Register Now  Support - Call Us : 09553760444  
Forgot Password Demo Video 
Test Our Service | Enter Mobile Number   +91     

Resources - Send SMS API library


Code to send SMS in C#


Code Sample:

void Page_Load(Object Src, EventArgs E) 
{
   myPage.Text = readHtmlPage("https://www.bulksmsgateway.in/sendmessage.php");
}
private String readHtmlPage(string url)
{    
       String result = "";
       String message = HttpUtility.UrlEncode("Hello world!");
       String strPost = "?user=9030888111&password=password&msg=" + message + "&sender=OPTINS" + "&mobile=mobnum" + "&type=1";
       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)
        {
          return 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();
       }
       return result;
}




Please note that some of the above code has been supplied to Bulk SMS Gateway 
by clients. As such, accuracy is not guaranteed by Bulk SMS Gateway.

Bulk SMS Service All Over India