|
发表于 2016-10-18 08:17:44
|
显示全部楼层
另外,这两步没有必要分开吧.直接做成一步就可以了.
HttpItem item2 = new HttpItem()
{
URL = "http://www.tb58.net/member.php?mod=logging&action=login",
Method = "post",
ContentType = "application/x-www-form-urlencoded",
Postdata = "formhash="+formhash+"&referer=http%3A%2F%2Fwww.tb58.net%2F.%2F&loginfield=username&username=90882288&password=19437kk&questionid=0&answer=",
};
string cookies= item2.Cookie;
string cookie = result.Cookie;
HttpItem item3 = new HttpItem()
{
URL = "http://www.tb58.net/member.php?mod=logging&action=login&loginsubmit=yes&loginhash=" + loginHash + "&inajax=1",
Method = "get",
ContentType = "application/x-www-form-urlencoded",
};
把第一个 URL = "http://www.tb58.net/member.php?mod=logging&action=login",
直接换成 URL = "http://www.tb58.net/member.php?mod=logging&action=login&loginsubmit=yes&loginhash=" + loginHash + "&inajax=1", |
|