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.