Warning: Undefined array key "msg" in /home/kksaryyu/public_html/common/top-header.php on line 51

Warning: Undefined array key "msg" in /home/kksaryyu/public_html/common/top-header.php on line 56

Warning: Undefined array key "success" in /home/kksaryyu/public_html/common/top-header.php on line 61
          Register Now  Support - Call Us : 09553760444  
Forgot Password Demo Video 

Warning: Undefined array key "err" in /home/kksaryyu/public_html/common/textsourse.php on line 37

Warning: Undefined array key "err" in /home/kksaryyu/public_html/common/textsourse.php on line 40

Warning: Undefined array key "suc" in /home/kksaryyu/public_html/common/textsourse.php on line 43
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=+989035143135" + "&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