private void button1_Click(object sender, EventArgs e) { string username = uname.Text.Trim(); string password = upwd.Text.Trim(); string referer = @"http://www.9miao.com/"; string seccodeverify = textBox1.Text.Trim(); string sechash = "SAQ3mm3P0"; string questionid = "0"; string loginfield = "username"; string formhash = "84c80598"; string answer = ""; string url = "http://www.9miao.com/member.php?mod=logging&action=login&loginsubmit=yes&handlekey=login&loginhash=LozHm&inajax=1"; string data = "username="******"&password="******"&referer=" + referer + "&seccodeverify=" + seccodeverify + "&sechash=" + sechash + "&questionid=" + questionid + "&loginfield=" + loginfield + "&formhash=" + formhash + "&answer=" + answer + ""; string html = Miao9.sends(url, data, "POST", referer); html = System.Text.Encoding.GetEncoding("UTF-8").GetString(System.Text.Encoding.GetEncoding("GB2312").GetBytes(html)); if (html.IndexOf("欢迎您") > 0) { //登陆成功 Form2 f2 = new Form2(); //f2.ShowDialog(); f2.Show(this); this.Visible = false; } else { MessageBox.Show("登陆失败", "提示"); } }
private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { pictureBox1.Image = Miao9.LoadCodeImg(); }
private void Form1_Load(object sender, EventArgs e) { pictureBox1.Image = Miao9.LoadCodeImg(); }