站长苏飞 发表于 2015-9-17 14:04
怎么写的代码
private static string Users_getmsg(string url, string referer, string cookie, string postdata)
{
HttpHelper Http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = url,
Method = "post",
Cookie = cookie,
Referer = referer,
Postdata = postdata,
Timeout = 10000,
ReadWriteTimeout = 10000,
ContentType = "application/x-www-form-urlencoded",//返回类型 可选项有默认值
ResultType = ResultType.String
};
HttpResult result = Http.GetHtml(item);
return result.Html;
}
1983444000 发表于 2015-9-17 14:08
[mw_shl_code=csharp,true] private static string Users_getmsg(string url, string referer, st ...
站长苏飞 发表于 2015-9-17 14:12
这个代码没有问题,应该不是这代码影响了,可以选择暂停一会儿再开始试试,可能是网站检查到你是非法请求 ...
1983444000 发表于 2015-9-17 14:14
好的多谢,抓包的时候 我见是每秒请求一次 我加延时也是一秒
欢迎光临 苏飞论坛 (http://www.sufeinet.com/) | Powered by Discuz! X3.4 |