Ejemplo n.º 1
0
 //sohu reg
 private void button2_Click(object sender, EventArgs e)
 {
     //GetImageEx
     GoodsFresh objFreshEx = new GoodsFresh();
     ClassHttpPost webPost = new ClassHttpPost();
     objFreshEx.SetWebPost(webPost);
     string strRet = webPost.GetHttpPage("http://passport.sohu.com/web/dispatchAction.action?registerType=Passport&showAllType=1",
             "gb2312", "get","", "",
             "",
             "*/*", "");
     string strError = "";
     objFreshEx.GetImageEx("c:\\ddddddd.bmp", out strError);
     //
     string strCode = "";
     string strNumber = "";
     strCode = "hfabe3a8";
     strNumber = "SCYLSLALELJLAPCLSLELSLAJYJPLYPJPNPULYJPLELYPNJSLJLAJSLYLAPUJUPCLAPLPJPNLYLAJSLYLAPUJUPCLSLAPLPNLALEPJLYLAPCJUPJLYLSLAJYJPLELYPCLEPNJPLEJYLEPNPJPCPJLALSPCPJLALYLEJSPULEJSPNPCPJLAPJLEJUPJLEJSPULEJPJY";
     string strData = string.Format("checkRegType=on&shortname=testregidnew2&user.password=wawawo20&password2=wawawo20&user.question=%CE%D2%BE%CD%B6%C1%B5%C4%D3%D7%B6%F9%D4%B0%C3%FB%B3%C6&questionbak=&answer=%B3%A4%BD%AD%D0%A1%D1%A7&validate={1}&privacy=1&uuidCode={0}&app_para=registerType%3DPassport%26showAllType%3D1&ot_registerid=&registerid=&appid=9998&autologin=1&ru=&domainName=sohu.com&registerType=Passport&showAllType=1",
         strNumber,
         strCode
         );
     strRet = webPost.GetHttpPage("https://passport.sohu.com/web/Passportregister.action",
             "gb2312", "POST","", strData,
             "https://passport.sohu.com/web/dispatchAction.action?registerType=Passport&showAllType=1",
             "*/*", "");
 }