[C#] 纯文本查看 复制代码 string Cookies = "";
string[] tem;
HttpHelper http = new HttpHelper();
HttpResult result = null;
//登陆
private void button1_Click_1(object sender, EventArgs e)
{
//获取猫扑登陆页面
HttpItem item = new HttpItem()
{
URL = "http://login.hi.mop.com/Login.do",
Encoding = null,
Method = "GET",
Cookie = "",
Allowautoredirect = true,
Referer = "",
};
result = http.GetHtml(item);
Cookies = result.Cookie;
//登陆
item = new HttpItem()
{
URL = "http://login.hi.mop.com/Login.do",
// Encoding = null,
Method = "POST",
Cookie = Cookies,
Allowautoredirect = true,
Postdata = "nickname=%E9%9B%A8%E9%AD%82%E5%A4%A9%E9%9B%AA&password=asd123258&origURL=http%3A%2F%2Fhi.mop.com%2FSysHome.do&loginregFrom=index&ss=10101",
};
result = http.GetHtml(item);
Cookies = result.Cookie;
webBrowser1.DocumentText = result.Html;
}
|