|
发表于 2013-3-5 19:44:44
|
显示全部楼层
admin 发表于 2013-3-5 19:14
http://www.sufeinet.com/thread-2002-1-1.html
我下了新版的helper,人工拼接URL可以,分开写提示密码错误··· 还请飞哥说下HttpItem中postdata与url设置方法···
[code=csharp] private void btnEnter_Click(object sender, EventArgs e)
{
HttpItem item = new HttpItem()
{
//URL = "https://reg.163.com/logins.jsp?url=&product=&savelogin=&outfoxer=&domains=" +
//"&syscheckcode=034715eb7e1f16cd332e41f95e3303204ceadd7e&username="
//+ txtUserName.Text.Trim() + "&password="
//+ txtPwd.Text.Trim() + "&Submit=",
URL = "https://reg.163.com/logins.jsp",
Postdata = "url=&product=&savelogin=&outfoxer=&domains="
+ "&syscheckcode=034715eb7e1f16cd332e41f95e3303204ceadd7e&username="
+ txtUserName.Text.Trim() + "&password="
+ txtPwd.Text.Trim() + "&Submit=",
Referer = "https://reg.163.com/logins.jsp",
Method = "post",
PostDataType = PostDataType.String,
};
HttpHelper http = new HttpHelper();
HttpResult result = http.GetHtml(item);
string cookie = result.Cookie;
lblMessages.Text = "cookie:" + cookie + Environment.NewLine;
item.URL = "http://reg.163.com/Main.jsp";
lblMessages.Text += result.Html;
}[/code] |
|