asp.net call fly free text message (test Effective) _ Practical skills

Source: Internet
Author: User
Copy Code code as follows:

#region Send Free Flight interface (2014-01-06 16:20 test valid)
<summary>
Free to send the Flying interface (to open a letter to the other side to add a friend can send, but also to their own hair test)
</summary>
<param name= "Sendnumber" > Landing Letter Mobile phone number </param>
<param name= "Sendpassword" > Login password </param>
<param name= "Receivenumber" > Receive mobile </param>
<param name= "Content" > SMS Contents </param>
<returns></returns>
public bool Sendfetion (string sendnumber, String Sendpassword, String receivenumber, String Content)
{

String url = string. Format ("Https://quanapi.sinaapp.com/fetion.php?u={0}&p={1}&to={2}&m={3}", Sendnumber, SendPassword, Receivenumber, Httputility.urlencode (Content));
String strret = "";
Try
{
HttpWebRequest hr = (HttpWebRequest) webrequest.create (URL);
hr. useragent = "mozilla/4.0" (compatible; MSIE 6.0; Windows NT 5.1) ";
hr. method = ' Get ';
hr. Timeout = 30 * 60 * 1000;
WebResponse hs = hr. GetResponse ();
Stream sr = HS. GetResponseStream ();
StreamReader ser = new StreamReader (SR, Encoding.default);
strret = ser. ReadToEnd ();
}
catch (Exception er)
{
strret = "";
}
if (!strret.contains (": 0")) return false;//returns data when successful: {"result": 0, ' message ': ' \u53d1\u9001\u6210\u529f '}
return true;
}
#endregion

The interface is built on the Sinaappengine, the SAE service is relatively reliable.
Sender users, passwords do not write wrong, and then the receiver must be their own or fly a friend, in order to send success.
Related Article

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.