日期:2014-05-17 浏览次数:20810 次
string username = "123";
string userPWD = "123";
string verifyCode = txtVerify.Text;
string errorTxt = string.Empty;
string strRetVal = Utils.getMd5Hash2(Utils.getMd5Hash(userPWD).ToUpper() + verifyCode.ToUpper()).ToUpper();
string postData = "u=" + username + "&p=" + strRetVal + "&verifycode=" + verifyCode + "&aid=15000101&u1=http%3A%2F%2Fphp.qzone.qq.com%2Findex.php%3Fmod%3Dportal%26act%3Dlogin&fp=loginerroralert&h=1&ptredirect=1&ptlang=0&from_ui=1&dumy=";
string result = HttpHelper.GetHtml("http://ptlogin2.qq.com/login", postData, true, cookie);
errorTxt = result;
result = HttpHelper.GetHtml("http://php.qzone.qq.com/index.php?mod=portal&act=login", cookie);
bool isLogin = result.Contains("g_iLoginUin = " + username);
if (!isLogin)
{
if (result.Contains("完成跳转"))
{
ChangeMessage("登录成功");
isLogin = true;
}
else
{
if (!isLogin)
{
if (result.Contains("g_iLoginUin=" + username))
{
ChangeMessage("登录成功");
&nbs