Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (System.Net.WebClient client = new System.Net.WebClient())
- {
- try
- {
- String url = "http://smsc.vianett.no/v3/send.ashx?" +
- "src=" + phone.Text + "&" +
- "dst=" + phone.Text + "&" +
- "msg=" + System.Web.HttpUtility.UrlEncode(messagebody.Text,System.Text.Encoding.GetEncoding("ISO-8859-1")) + "&" + "username="+System.Web.HttpUtility.UrlEncode(username.Text) + "&" +
- "password="+System.Web.HttpUtility.UrlEncode(pass.Text);
- String result = client.DownloadString(url);
- if (result.Contains("OK"))
- {
- MessageBox.Show("message sended");
- }
- else
- {
- MessageBox.Show("message not sended");
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement