我已经阅读了几篇关于登录需要电子邮件和密码的网站的帖子,但我找不到关于登录到名为geni.com的特定网站的解决方案..有没有办法
CookieContainer cookie;
string user = "somemail@somehost.com";
string pass = "123456";
string formUrl = "http://www.geni.com/login/";
string formParams = String.Format("profile_username={0}&password={1}", "MYUSERNAME", "MYPASS");
string cookieHeader;
HttpWebRequest myWebRequest;
WebResponse myWebResponse;
String URL = textBox1.Text;
myWebRequest = (HttpWebRequest)WebRequest.Create("formUrl");
myWebRequest.ContentType = "application/x-www-form-urlencoded";
myWebRequest.Method = "POST";
string login = string.Format("go=&Fuser={0}&Fpass={1}", user, pass);
byte[] postbuf = Encoding.ASCII.GetBytes(login);
myWebResponse = myWebRequest.GetResponse(); //Returns a response from an Internet resource
cookieHeader = myWebResponse.Headers["Set-cookie"];
cookie = myWebRequest.CookieContainer = new CookieContainer();
myWebRequest.CookieContainer = cookie;
Stream streamResponse = myWebResponse.GetResponseStream();
StreamReader sreader = new StreamReader(streamResponse);
Rstring = sreader.ReadToEnd();
我有点迷茫,谁能帮帮我??