|
1金钱
string url = "https://login.weixin.qq.com/jslogin?appid=wx782c26e4c19acffb&redirect_uri=https%3A%2F%2Fwx.qq.com%2Fcgi-bin%2Fmmwebwx-bin%2Fwebwxnewloginpage&fun=new&lang=zh_CN&_=1365142128439";
string cookie = GetCookieString(url);
DotNet4.Utilities.HttpHelper http = new DotNet4.Utilities.HttpHelper();
DotNet4.Utilities.HttpItem item = new DotNet4.Utilities.HttpItem()
{
URL = url,//URL 必需项
Method = "get",//URL 可选项 默认为Get
Cookie = cookie,//字符串Cookie 可选项
UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36",//用户的浏览器类型,版本,操作系统 可选项有默认值
Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",// 可选项有默认值
ContentType = "text/javascript;text/html; charset=gbk",//返回类型 可选项有默认值
Host = "login.weixin.qq.com",
Encoding = Encoding.GetEncoding("gbk")
};
//得到HTML代码
item.Header.Add("Content-Encoding:deflate");
item.Header.Add("Accept-Language:zh-CN,zh;q=0.8");
item.Header.Add("Accept-Encoding:gzip, deflate, sdch");
DotNet4.Utilities.HttpResult result = http.GetHtml(item);
Response.Write(result.Html);
}
大神指点一二,到底哪里错了。
|
|