[Asm] 纯文本查看 复制代码 object o = new object();
button1.Enabled = false;
WebRequest request = WebRequest.Create("https://upay.10010.com/npfweb/NpfCellWeb/Mustpayment/getMustpayment?number=" + textBox1.Text);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
System.IO.StreamReader data = new System.IO.StreamReader(response.GetResponseStream());
string returnStr = data.ReadToEnd();
string[] value = returnStr.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
lock (o)
{
string Result = value[1].Substring(7, value[1].LastIndexOf("\"") - 7);
switch (Result)
{
case "success":
string balance = value[0].Substring(12, value[0].LastIndexOf("\"") - 12);
MessageBox.Show("欠费:" + balance);
break;
case "input": MessageBox.Show("不要乱输入哦");
break;
case "error": MessageBox.Show("不是联通号码");
break;
}
}
button1.Enabled = true;
我测试返回的都是{"out":"busy"}
上网页查询也是这个结果 |