-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathPOST-send-sms.cs
38 lines (31 loc) · 1.02 KB
/
POST-send-sms.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Collections.Specialized;
using System.Text;
namespace Demo
{
public class Program
{
public static void Main(string[] args)
{
string messageID = string.Empty;
using (var wb = new System.Net.WebClient())
{
var data = new NameValueCollection();
data["username"] = "xxxxxxx";
data["password"] = "xxxxxx";
data["mno"] = "6017xxxxxx";
data["msg"] = "Hello Teting";
data["Sid"] = "Sender";
data["mt"] = "0";
data["fl"] = "0";
data["ipcl"]= "192.168.1.1";
var results = wb.UploadValues("http://1s2u.com/sms/sendsms/sendsms.asp", "POST", data);
messageID = Encoding.UTF8.GetString(results);
}
Console.WriteLine(messageID);
}
}
}