|
1金钱
X-Forwarded-For 加入?
这样好像好像无效?
item = new HttpItem()
{
URL = "http://www.sufeinet.com/",//Url 必须
Postdata = "ABCD",//Post数据
Method = "GET",// 数据方式,可选项默认Get
Accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-silverlight, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-silverlight-2-b1, */*", // Accept = "text/html, application/xhtml+xml, */*",// 可选项有默认值
Encoding = System.Text.Encoding.GetEncoding("gb2312"),//
ContentType = "application/x-www-form-urlencoded",
UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)", // UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MyIE2; Alexa Toolbar; mxie; .NET CLR 1.1.4322)",
Cookie = "",
Timeout = 100000,//连接超时时间 可选项默认为100000
ReadWriteTimeout = 30000,//写入Post数据超时时间 可选项默认为30000
IsToLower = false,//得到的HTML代码是否转成小写 可选项默认转小写
// Referer = Referer,//来源URL 可选项
Allowautoredirect = true,//是否根据301跳转 可选项
Connectionlimit = 1024,//最大连接数 可选项 默认为1024
};
item.Header.Add("X-Forwarded-For", "217.15.127.224"); //变换IP 这一句对不对?
|
|