Public Static stringPostURL ="Http://zapi.253.com/msg/HttpBatchSendSM"; Static voidMain (string[] args) { stringAccount =""; stringPassword =""; stringMobile ="1"; stringContent ="your login Verification code is 1234"; stringPOSTSTRTPL ="account={0}&pswd={1}&mobile={2}&msg={3}&needstatus=true&product=&extno="; UTF8Encoding encoding=Newutf8encoding (); byte[] postdata = encoding. GetBytes (string. Format (POSTSTRTPL, account, password, mobile, content)); HttpWebRequest Myrequest=(HttpWebRequest) webrequest.create (PostURL); Myrequest.method="POST"; Myrequest.contenttype="application/x-www-form-urlencoded"; Myrequest.contentlength=postdata.length; Stream Newstream=Myrequest.getrequeststream (); //Send the data.Newstream.write (PostData,0, postdata.length); Newstream.flush (); Newstream.close (); HttpWebResponse Myresponse=(HttpWebResponse) myrequest.getresponse (); if(Myresponse.statuscode = =Httpstatuscode.ok) {StreamReader reader=NewStreamReader (Myresponse.getresponsestream (), Encoding.UTF8); Myresponse.close (); Myrequest.abort (); Console.WriteLine ("sent successfully"); Console.readkey (); } Else{myrequest.abort (); Myresponse.close (); Console.WriteLine ("Send failed"); Console.readkey (); } }
Create blue Voice service. Net
Create Blue Voice Service (voice notification verification code). Net