Send SMS case, refer to the blog written by Love
Http://www.cnblogs.com/qingyuan/archive/2010/02/25/1673377.html
Here's how:
1. Registered Account
http://ad.smsadmin.cn/
SMS General Platform Registration account, after the successful registration, the relevant business personnel call to ask you specifically what business, rookie I do not understand, what business is not open
2. Code writing
Related API, login after successful registration, help Center can see
The following is written to facilitate copying
Test url:http://www.smsadmin.cn/smsmarketing/wwwroot/api/get_send/
Send type: GET
Parameters: ? uid=userid&pwd=password&mobile=telephone&msg=msgcontent&dtime=time
Parameter description: UID refers to the account you registered on this platform
PWD is the platform login password
Mobile is the mobile number of the person you want to send. Can be sent a bulk message, send the number in English ";" Separated
MSG is the content sent by SMS
DTIME Specifies the time that the SMS is sent if the time is null is sent immediately (2010-2-25 13:28:00)
Return parameters: 0 successfully sent
2 Insufficient balance
1 Incorrect user name or password
3 over Send maximum 100
4 This user is not allowed to send
5 phone number or send message cannot be empty
6. Include sensitive characters
Note: The GET interface currently supports only 100 numbers
StringBuilder sb = new StringBuilder ();
Sb. Append ("http://www.smsadmin.cn/smsmarketing/wwwroot/api/get_send/");
var uid = "******"; Registered Account
var pwd = "******"; Password for registration
var msg = "hello! Welcome come to Messgae test, SMS Testing "; Send the content of the SMS
var mobile = "* * * * *"; Receiver's phone number.
Dtime input is sent to point in time, NULL is sent immediately
Sb. AppendFormat ("? Uid={0}&pwd={1}&mobile={2}&msg={3}&dtime={4}", UID, pwd, Mobile, Server.URLEncode ( msg), NULL);
WebClient WebClient = new WebClient ();
return result processing
0 successful Delivery
2 Insufficient balance
1 Incorrect user name or password
3 over send maximum 10,000
4 This user is not allowed to send
5 phone number or send message cannot be empty
6. Include sensitive characters
var result = webclient.downloadstring (sb.) ToString ());
Problem: There is a problem with Chinese encoding, post-resolution
Send SMS Case