Code
Cookiecontainer CC = New Cookiecontainer ();
String URL = "Http: // Mailbeta.263.net/xmweb.pdf ";
Httpwebrequest request = (Httpwebrequest) webrequest. Create (URL );
Request. Method = "Post ";
Request. contenttype = "Application / X - WWW - Form - Urlencoded ";
Request. cookiecontainer = CC;
String User = "User "; // User Name
String Pass = "Pass "; // Password
String Data = "Func = Login & USR = " + Httputility. urlencode (User) + " & Sel_domain = 263 . Net & Domain = 263 . Net & Pass = " + Httputility. urlencode (PASS) + " & Image2.x = 0 & Image2.y = 0 & Verifypcookie = & Verifypip = ";
Request. contentlength = Data. length;
Streamwriter = New Streamwriter (request. getrequeststream (), encoding. ASCII );
Writer. Write (data );
Writer. Flush ();
Httpwebresponse response = (Httpwebresponse) request. getresponse ();
String Encoding = Response. contentencoding;
If (Encoding = Null | Encoding. Length < 1 ){
Encoding = " UTF-8 " ; // Default encoding
}
Streamreader = New Streamreader (response. getresponsestream (), encoding. getencoding (encoding ));
Data = Reader. readtoend ();
Console. writeline (data );
Response. Close ();
Int Index = Data. indexof ( " SID = " );
String Sid = Data. substring (Index + 4 , Data. indexof ( " & " , Index) - Index - 4 );
Console. writeline (SID );
URL = " Http://wm11.263.net/xmweb? Func = mlst & act = show & USR = " + User + " & SID = " + Sid + " & FID = 1 & DESC = 1 & Pg = 1 & searchword = & searchtype = & searchsub = & searchfd = & sort = 4 " ;
Request = (Httpwebrequest) webrequest. Create (URL );
Request. cookiecontainer = CC;
Foreach (Cookie In Response. Cookies ){
Cc. Add (cookie );
}
Response = (Httpwebresponse) request. getresponse ();
Encoding = Response. contentencoding;
If (Encoding = Null | Encoding. Length < 1 ){
Encoding = " UTF-8 " ; // Default encoding
}
Reader = New Streamreader (response. getresponsestream (), encoding. getencoding (encoding ));
Data = Reader. readtoend ();
Console. writeline (data );
Response. Close ();
The above simulated login 263 mailbox,
// Does post automatically jump ??
Request. allowautoredirect =True;