|
1金钱
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "http://www.sufeinet.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&inajax=1",
Host = "www.sufeinet.com",
Method = "Post",
Referer = "http://www.sufeinet.com/",
UserAgent = "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)",
Postdata = "fastloginfield=username&username=550853006&password=123123.q&quickforward=yes&handlekey=ls",
ContentType = "application/x-www-form-urlencoded",
Cookie = null,
};
HttpResult result = http.GetHtml(item);
string cookie = result.Cookie;
rZmA_05a9_saltkey=OUUkxh6G; expires=Fri, 13-Jun-2014 08:25:34 GMT; path=/; domain=.sufeinet.com; httponly,rZmA_05a9_lastvisit=1400052334; expires=Fri, 13-Jun-2014 08:25:34 GMT; path=/; domain=.sufeinet.com,rZmA_05a9_sid=ezmQ1n; expires=Thu, 15-May-2014 08:25:34 GMT; path=/; domain=.sufeinet.com,rZmA_05a9_lastact=1400055934%09member.php%09logging; expires=Thu, 15-May-2014 08:25:34 GMT; path=/; domain=.sufeinet.com,rZmA_05a9_ulastactivity=b2feVUXeAcV88xCrb6GFuac7Nt9lCfimrNFIL7tTQu%2FYxB3NHauY; expires=Thu, 14-May-2015 08:25:34 GMT; path=/; domain=.sufeinet.com,rZmA_05a9_sid=ezmQ1n; expires=Thu, 15-May-2014 08:25:34 GMT; path=/; domain=.sufeinet.com,rZmA_05a9_auth=94a7fWKTMS0zoP8P7zJAN8qQ6iBsx6r4%2FaQBE%2FLrg9GLxJhsyPfUFQ6iFr5Oksw%2FtmBX8GTL1zS0OL5I8h9FzKT0zQ; path=/; domain=.sufeinet.com; httponly,rZmA_05a9_loginuser=deleted; expires=Tue, 14-May-2013 08:25:33 GMT; path=/; domain=.sufeinet.com,rZmA_05a9_activationauth=deleted; expires=Tue, 14-May-2013 08:25:33 GMT; path=/; domain=.sufeinet.com,rZmA_05a9_pmnum=deleted; expires=Tue, 14-May-2013 08:25:33 GMT; path=/; domain=.sufeinet.com,rZmA_05a9_lastcheckfeed=18471%7C1400055934; expires=Thu, 14-May-2015 08:25:34 GMT; path=/; domain=.sufeinet.com,rZmA_05a9_checkfollow=1; expires=Wed, 14-May-2014 08:26:04 GMT; path=/; domain=.sufeinet.com,rZmA_05a9_lip=116.231.190.177%2C1400055699; path=/; domain=.sufeinet.com
第一段是我的代码 第二段是COOKIE的内容 我要如何判断我是否已经登陆成功了啊?
string str = result.Html
如果我这样写 就会收到下面这种东西
<?xml version="1.0" encoding="gbk"?>
<root><![CDATA[<script type="text/javascript" reload="1">window.location.href='http://www.sufeinet.com/';</script>]]></root>
各位前辈 有没有好的意见啊
|
|