我需要做一个注册账号的软件。
PS:是公司要求的,不是做挂什么的,请大家不要误会。我是使用idhttp来做的
procedure TForm1.Button1Click(Sender: TObject);
var
  ms: TMemoryStream;
  png:TdxPNGImage;
begin
  ms:=TMemoryStream.Create;
  png:=TdxPNGImage.Create;
  IdHTTP1.Get('http://www.jxds.gov.cn/wssw/jsp/includes/zcyzm.jsp',ms);
  ms.Position := 0;
  png.LoadFromStream(ms);
  Image1.Picture.Assign(png);
end;目前验证码是能成功提取到了。而post,也通过httpwatch抓到了,但是本人对这方面的编程借进与小白- -这是httpwatch抓到的Post data 中的xml文件<?xml version="1.0" encoding="GBK"?><rootVo ><head></head><properties><cell name="email" value="" /><cell name="fax" value="" /><cell name="frdb" value="۵" /><cell name="mobile" value="" /><cell name="nsrglm" value="01010010" /><cell name="password" value="111111" /><cell name="password_answer" value="4444444444444" /><cell name="password_question" value="3333333333333" /><cell name="register_bsr_no" value="" /><cell name="register_id_no" value="" /><cell name="register_is_bsr" value="N" /><cell name="register_name" value="͵" /><cell name="sex" value="0" /><cell name="taxregcode" value="123132132132" /><cell name="tel" value="" /><cell name="yzm" value="4177" /></properties></rootVo>但是我在Delphi中,直接提交,虽然没有报错,但是返回的都是空的,按理说,注册失败的话,总会有因为什么原因注册失败的。但是我不晓得我哪里设置错了,或者什么问题,每次返回都是空,试了好多方法。方法1:直接提交抓包的xml。  str:=TStringList.Create;
  XML1:=TXMLDocument.Create(nil);
  XML1.LoadFromFile('xml.XML');
  str.Add(XML1.XML.Text);
  IdHTTP1.Post('http://www.jxds.gov.cn/wssw/sbController.do?cmd=glfw_qy_zc',str,str1);
  showmessage(UTF8Decode(str1.DataString));
返回空值- -方法2:自己写stringlist的内容提交,请教别人后告诉我,提交网页代码Form后面的部分。  str:=TStringList.Create;
  str1:=TStringStream.Create('');
  str.Add('rootVo.properties*nsrglm='+'11111111');
  str.Add('rootVo.properties*taxregcode='+'36111111111101');
  str.Add('rootVo.properties*frdb='+'颜德');
  str.Add('rootVo.properties*register_name='+'颜德');
  str.Add('rootVo.properties*password='+'111111');
  str.Add('passwordConfirm='+'111111');
  str.Add('rootVo.properties*password_question='+'123456');
  str.Add('rootVo.properties*password_answer='+'123456');
  str.Add('rootVo.properties*yzm='+Edit1.Text); 
  IdHTTP1.Post('http://www.jxds.gov.cn/wssw/sbController.do?cmd=glfw_qy_zc',str,str1);
  showmessage(UTF8Decode(str1.DataString)); 
还是返回空。。方法3:我不晓得rootVo.properties*这一段是什么意思- -(本人主要工作于C/S模式的管理软件编程,对网络编程完全的小白。)所以我决定去掉,提交试试。  str:=TStringList.Create;
  str.Add('nsrglm='+'11111111');
  str.Add('taxregcode='+'36111111111101');
  str.Add('frdb='+'颜德');
  str.Add('register_name='+'颜德');
  str.Add('password='+'111111');
  str.Add('passwordConfirm='+'111111');
  str.Add('password_question='+'123456');
  str.Add('password_answer='+'123456');
  str.Add('yzm='+Edit1.Text); 
  IdHTTP1.Post('http://www.jxds.gov.cn/wssw/sbController.do?cmd=glfw_qy_zc',str,str1);
  showmessage(UTF8Decode(str1.DataString)); 返回还是空0.0还尝试过把xml转换成stringstream发送,返回也是空空!空!空!  搞了2天了,百度了N多内容,看别人写都这么简单,可是我就是搞不懂为什么我提交不了请高手指点。。万分感谢。