| 本帖最后由 whfengbin 于 2014-12-13 14:54 编辑 
 验证码可以正常显示,但是POST过去后总是返回验证码错误!
 user.qunar.com 这是网址!
 用户名:rxletnm1524
 密码:AAbb123456
 
 代码如下://这是获取验证码
 
 [C#] 纯文本查看 复制代码  private void Form1_Load(object sender, EventArgs e)
        {
long dt = ConvertDateTimeInt(System.DateTime.Now);
            string url = "https://user.qunar.com/captcha/api/image?k={en7mni(z&p=ucenter_login&c=ef7d278eca6d25aa6aec7272d57f0a9a"+dt.ToString();
            HttpItem pic = new HttpItem()
            {
                URL = url,
                Method = "get"
            };
            this.pictureBox1.Image = http.GetImage(pic);
        }
 
 //这是点击登陆按钮
 
 [C#] 纯文本查看 复制代码 private void button1_Click(object sender, EventArgs e)
        {
            string data = string.Format("loginType=0&password=2003!&remember=1&ret=http://www.qunar.com/?ex_track=auto_52b7f5af&username=CCE8&vcode={0}", Ipt_Code.Text.Trim());
            HttpItem item = new HttpItem()
            {
                URL = "https://user.qunar.com/passport/loginx.jsp",
                Method = "post",
                ContentType = "application/x-www-form-urlencoded",
                Host = "user.qunar.com",
                Referer = "https://user.qunar.com/passport/login.jsp?ret=http%3A%2F%2Fuser.qunar.com%2Fuserinfo%2Findex.jsp",
                Postdata = data,               
            };
            HttpResult result = http.GetHtml(item);
            this.textBox3.Text = result.Html;
            string cookie = result.Cookie;
        }
 
 |