标签:
private bool CheckLogin()
{
HttpHelper httpHelper = new HttpHelper();
string refUrl = "http://ui.ptlogin2.qq.com/cgi-bin/login?appid=3000801&s_url=http%3A%2F%2Fqun.qq.com%2Fgod%2Fsucc.htm&f_url=loginerroralert&lang=2052&bgcolor=ffffff&style=1&low_login=1&link_target=blank&target=self&hide_title_bar=1&dummy=1";
string verifyCode = this.txtVerify.Text;
string postData = string.Format("u={0}&p={1}&verifycode={2}&aid=3000801&u1=http%3A%2F%2Fqun.qq.com%2Fgod%2Fsucc.htm&h=1&ptredirect=0&ptlang=2052&from_ui=1&dumy=&fp=loginerroralert",
this.txtUsername.Text, QQEncryptUtil.EncodePasswordWithVerifyCode(this.txtPassword.Text, verifyCode), verifyCode);
string result = httpHelper.GetHtml("http://ptlogin2.qq.com/login?" + postData, Portal.gc.cookieQun, refUrl);
string errorTxt = result;
bool isLogin = result.Contains("登录成功!");
return isLogin;
}
、、、、、
标签:
原文地址:http://www.cnblogs.com/watchfluture/p/4668261.html