Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 呼び出し部分など
- // ボタンのクリックイベントに記述しています
- byte[] data = null;
- CookiePostClass cpclass = new CookiePostClass();
- Encoding enc = Encoding.GetEncoding("euc-jp");
- cpclass.GetHtml("http://www.yahoo.co.jp/");
- cpclass.GetHtml("http://kids.yahoo.co.jp/");
- string str = cpclass.GetHtml("http://kids.yahoo.co.jp/");
- string search = "<input type=\"hidden\" name=\"t\" value=\"";
- int start = str.IndexOf(search) + search.Length;
- int length = str.IndexOf("\"", start) - start;
- string md5 = str.Substring(start, length);
- search = "<input type=\"hidden\" name=\"sk\" value=\"";
- start = str.IndexOf(search) + search.Length;
- length = str.IndexOf("\"", start) - start;
- string md52 = str.Substring(start, length);
- string post = "poll_id=" + HttpUtility.UrlEncode("11989") + "&t=" + HttpUtility.UrlEncode(md5) + "&sk=" + HttpUtility.UrlEncode(md52) + "&user_choice=" + HttpUtility.UrlEncode("8");
- MessageBox.Show(post);
- textBox5.Text = cpclass.PostData("http://kids.yahoo.co.jp/quizresults.php", post);
Advertisement
Add Comment
Please, Sign In to add comment