HttpWebRequest hWebReq = (HttpWebRequest)HttpWebRequest.Create(http://jafa.burnham.org/newSession.html);
HttpWebResponse hWebResp;
hWebReq.Method ="POST";
hWebReq.Referer =http://jafa.burnham.org/newSession.html;
//7d714.. şeklinde bilgileri de içeren yukarda belirtilen dosya, formun submit edilme anında ethereal ile yakalanmış
byte[] bf = File.ReadAllBytes(@"C:\myReq.txt");
hWebReq.ContentLength = bf.Length;
hWebReq.ContentType = "multipart/form-data; boundary=---------------------------7d7148ee0142";// Son Bulunan Nokta
hWebReq.Accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, */*";
hWebReq.Headers.Add("Cookie", webBrowser1.Document.Cookie);
hWebReq.GetRequestStream().Write(bf, 0, bf.Length);
hWebResp = (HttpWebResponse)hWebReq.GetResponse();
Stream str = hWebResp.GetResponseStream();
byte[] buf = new byte[20000];
//İlk oluşturmada string nesnesinin bir sorunu vardı; tüm bilgileri koyamadık; bu yüzden multiline bir textBox'ın içerisine 2 defada veriyi bastık, sonra geri aldık. O yüzden 2 defa tekrarlanıyor.str.Read(buf, 0, buf.Length);
str.Flush();
textBox1.Text = Encoding.ASCII.GetString(buf);
buf.Initialize();
str.Read(buf, 0, buf.Length);
textBox1.Text += Encoding.ASCII.GetString(buf);
string strPage = textBox1.Text;
string substrP = strPage.Substring(strPage.IndexOf("/result.html?ID="),"/result.html?ID=d398f118d3100146de4252289e68432a".Length );
substrPage = substrP.Substring("/result.html?ID=".Length, 32);
textBox2.Text = substrPage;
string strur = "http://jafa.burnham.org/result.html?ID=" + substrPage;
webBrowser2.AllowNavigation = true;
webBrowser2.Navigate(strur);
Yazar: M. Tahir Çakmak