日期:2014-05-17 浏览次数:20449 次
String u = "http://202.91.245.120/HttpPostSms.aspx?userid=" + smsName + "&pwd=" + smsPwd + "&mobiles=" + smsMobile + "&msgcontent=" + smsContent + ""; HttpWebRequest request = HttpWebRequest.Create(u) as HttpWebRequest; HttpWebResponse response = request.GetResponse() as HttpWebResponse; Stream resStream = response.GetResponseStream(); StreamReader sr = new StreamReader(resStream, System.Text.Encoding.GetEncoding("GB2312")); String returnText = sr.ReadToEnd(); resStream.Close(); sr.Close(); Label2.Text = returnText.ToString(); if (returnText.Substring(0,3).Equals("100")) { Label1.Text = "成功"; } else { Label1.Text = "失败"; }