求助代理IP如何判断是否可用!用Get的办法发现非常慢,有的代理访问网页需要十几秒才返回数据
怎么样可以限制他的响应时间,比如设定成1秒,1秒后不响应 ,就直接跳过
[C#] 纯文本查看 复制代码 HttpHelper helper = new HttpHelper();
HttpItem items;
HttpResult hr = new HttpResult();
string StrCookie = "";
string res = string.Empty;
string url = "http://www.sufeinet.com";
items = new HttpItem();
items.URL = url;
items.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0";
items.Cookie = StrCookie;
items.Allowautoredirect = true;
items.ProxyIp = "220.137.155.228:8080";//设置代理
items.ContentType = "application/x-www-form-urlencoded";
hr = helper.GetHtml(items);
res = hr.Html;
|