|
楼主 |
发表于 2013-1-27 19:19:19
|
显示全部楼层
private string Post2Url(string Data,string Proxy,string Url)
{
DotNet.Utilities.HttpItem Info=new DotNet.Utilities.HttpItem();
DotNet.Utilities.HttpHelper POST=new DotNet.Utilities.HttpHelper();
Info.Postdata = Data;
if (Proxy != "")
Info.ProxyIp = Proxy;
Info.Method = "post";
Info.URL = Url;
Info.Encoding = "UTF-8";
Info.ContentType = "application/x-www-form-urlencoded";
return POST.GetHtml(Info);
}
这是获取POST后的源码函数
public void MyThread()
{
Console.WriteLine("线程启动");
setProp(false);
string data="";
string myinfo="";
int ret=0;
button2.Enabled = true;
Serverfalse: while (flag)
{
Thread.Sleep(200);
data = Todata(CurrentNum, Ptr);
Console.WriteLine(data);
try
{
myinfo = Post2Url(data, Mproxy, Mserver).Trim();
ret = check(myinfo);
Console.WriteLine(myinfo);
switch (ret)
{
case 1: RightNum();
//Console.WriteLine("right");
break;
case 2: WrongPWD();
//Console.WriteLine("wrong");
break;
case 3: WrongNum();
// Console.WriteLine("unused");
break;
default: WrongServer();
//Console.WriteLine("retry");
break;
}
Count += 1;
Total.Text = Count.ToString();
}
catch
{
Unexpect++;
Unexpectdsp.Text = Unexpect.ToString();
goto Serverfalse;
}
}
}
这是主线程循环
|
|