问题描述
http://www.baidu.com/s?wd=%BF%AA%D0%C4%CD%F8001&rsv_bp=0&rsv_spt=3&oq=kaixinwang&rsp=1&f=3&inputT=2390#我怎么模拟登录不了。求解决办法。。dss=mh.GetResponse("http://www.kaixin001.com/login/login.php","email=504402105@qq.com&password=chenrujia&src=bdo","post","");publicstringGetResponse(stringurl,stringpostData,stringmethod,stringRequestUri){url.Trim();HttpWebRequestrequest=null;try{request=(HttpWebRequest)WebRequest.Create(url);}catch{return"";}if(request==null)return"";request.Method=method;request.UserAgent="Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.1;EmbeddedWB14.52from:http://www.bsalsa.com/EmbeddedWB14.52;.NETCLR2.0.50727;CIBA)";//request.Timeout=3338;request.KeepAlive=true;request.AllowAutoRedirect=true;//request.Accept="text/vnd.wap.wml,application/vnd.wap.wmlscript,application/vnd.wap.wml,text/vnd.wap.wmlscript,application/x-hdmlc,application/x-uvnd.uplanet.list,text/x-hdml,text/plain,image/vnd.wap.wbmp,image/bmp,application/remote-printingtext/x-hdml;version=3.1,text/x-hdml;version=3.0,text/x-hdml;version=2.0,image/bmp,*/*";//request.UserAgent="CDRWapIE/2.07";//request.Headers.Add("Accept-Charset","GB2312,utf-8;q=0.7,*;q=0.7");//request.Headers.Add("Accept-Language","zh-cn,zh;q=0.5");request.CookieContainer=myCookieContainer;try{if(RequestUri!=null&&RequestUri!="")request.Referer=RequestUri;elserequest.Referer=request.RequestUri.ToString();}catch{}request.ContentType="application/x-www-form-urlencoded";HttpWebResponsewebresponse=null;try{if(postData.Length>0){byte[]loginDataBytes=Encoding.Default.GetBytes(postData);request.ContentLength=loginDataBytes.Length;Streamstream=request.GetRequestStream();stream.Write(loginDataBytes,0,loginDataBytes.Length);stream.Close();}webresponse=request.GetResponse()asHttpWebResponse;if(webresponse!=null){returnGetResponseHTML(webresponse);}}catch{}finally{if(webresponse!=null){webresponse.Close();}}return"";}publicinttype=0;publicstringdownName;publicstringdownUrl;publicstringGetResponseHTML(HttpWebResponseresponse){if(type==1){StreamfileStream=null;StreamresponseStream=response.GetResponseStream();fileStream=File.Create("33.png");byte[]bytes=newbyte[1024];intcount=0;do{count=responseStream.Read(bytes,0,bytes.Length);fileStream.Write(bytes,0,count);}while(count>0);responseStream.Close();fileStream.Close();return"33.png";}stringstrHTML=reader.ReadToEnd();if(reader!=null){reader.Close();}if(response!=null){response.Close();}returnstrHTML;}
解决方案
解决方案二:
返回的是。正在登录中。。。。。急!!!谁能帮我解决下。QQ504402105帮他冲100块钱话费!!
解决方案三:
加我请注明下。。。钱不多。麻烦csdn亲友们帮帮我。。。
解决方案四:
顶一下。我前两天也问过。可惜也没搞定。。。。。。。。。。
解决方案五:
我来。。。。试一把
解决方案六:
什么情况,有结果没??
解决方案七:
getResponse里面发送的东西对不对,用抓包器看看网页上登录的时候都发了些什么东西。
解决方案八:
httpwatch??????????
解决方案九:
在来关注下。。。。。。。。。
解决方案十:
解决方案十一:
他发包的时候应该都加密了吧..你抓出来分析一下!