|
http://www.hx58.com/vote/vote_4.html获取
HttpHelper http = new HttpHelper();
{
URL = "http://www.hx58.com/getcode.html?tafdst=sdfr",//URL 必需项
Method = "get",//URL 可选项 默认为Get
Cookie = "",//字符串Cookie 可选项
UserAgent = "Mozilla/5.0 (Windows NT 5.1; rv:35.0) Gecko/20100101 Firefox/35.0",//用户的浏览器类型,版本,操作系统 可选项有默认值
ContentType = "text/html",//返回类型 可选项有默认值
ResultType = ResultType.Byte,
};
HttpResult result11 = http.GetHtml(item);
string html11 = result.Html;
string cookie11 = result.Cookie;
投票
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "http://www.hx58.com/request.aspx?action=toupiao&voteid=4&code="+textBox1.Text+"&xuanshouid=269&name=&tel=&k=Fri%20May%2022%202015%2022:44:12%20GMT+080040000",
Method = "get",//URL 可选项 默认为Get
Cookie = cookie11,//字符串Cookie 可选项
Referer = "http://www.hx58.com/vote/vote_4.html",//来源URL 可选项
UserAgent = "Mozilla/5.0 (Windows NT 5.1; rv:35.0) Gecko/20100101 Firefox/35.0",//用户的浏览器类型,版本,操作系统 可选项有默认值
ContentType = "text/html",//返回类型 可选项有默认值
ResultType = ResultType.Byte,
};
HttpResult result = http.GetHtml(item);
string html = result.Html;
string cookie = result.Cookie;
|
|