https://passport.utouu.com/login
论坛里的https登录的例子大多不能用了,这个网站的应该比较简单点,但我试了没成功,谁帮忙做一下
[C#] 纯文本查看 复制代码 HttpHelper http = new HttpHelper();
string p1 = null;
p1 = addpost(p1, "username", "1396XXXX");
p1 = addpost(p1, "password", "XXXX");
HttpItem item = new HttpItem()
{
URL = "https://passport.utouu.com/login",
Encoding = System.Text.Encoding.UTF8,
Method = "post",
Postdata = p1,
ContentType = "text/html;charset=UTF-8",
KeepAlive = true,
};
HttpResult result = http.GetHtml(item);
string html = result.Html;
string cookie = result.Cookie;
textBox1.Text = "cookie=" + cookie;
item = new HttpItem()
{
URL = "http://member.utouu.com/message",
Cookie = cookie,
Referer = "",
Postdata = "",
Timeout = 100000,
ReadWriteTimeout = 30000,
UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)",
ContentType = "application/x-www-form-urlencoded",
Allowautoredirect = true,
};
result = http.GetHtml(item);
html = result.Html;
|