daily pastebin goal
35%
SHARE
TWEET

Untitled

a guest Dec 29th, 2016 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using (System.Net.WebClient client = new System.Net.WebClient())
  2. {
  3.     try
  4.     {
  5.         String url = "http://smsc.vianett.no/v3/send.ashx?" +
  6.             "src=" + phone.Text + "&" +
  7.             "dst=" + phone.Text + "&" +
  8.             "msg=" + System.Web.HttpUtility.UrlEncode(messagebody.Text,System.Text.Encoding.GetEncoding("ISO-8859-1")) + "&" +                        "username="+System.Web.HttpUtility.UrlEncode(username.Text) + "&" +
  9.             "password="+System.Web.HttpUtility.UrlEncode(pass.Text);
  10.         String result = client.DownloadString(url);
  11.         if (result.Contains("OK"))
  12.         {
  13.             MessageBox.Show("message sended");
  14.         }
  15.         else
  16.         {
  17.             MessageBox.Show("message not sended");
  18.         }
  19.     }
  20.     catch (Exception ex)
  21.     {
  22.         MessageBox.Show(ex.Message);
  23.     }
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top