Create Blue Voice Service (voice notification verification code). Net

Source: Internet
Author: User

   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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.