zoukankan      html  css  js  c++  java
  • delphi 八字排盘源码(post数据以后,又分析数据)

    procedure TForm1.Button14Click(Sender: TObject);
    var
      ls: TStringList;
      lstr: string;
      lss: TMemoryStream;
    begin
      inherited;
     idHttp1.Request.CustomHeaders.Text :=
      'Accept: image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, */*' + #13#10
     +'Referer: http://www.china95.net/PAipan/bazi/' + #13#10
     +'Accept-Language: zh-Hans-CN,zh-Hans;q=0.8,en-US;q=0.5,en;q=0.3' + #13#10
     +'Content-Type: application/x-www-form-urlencoded' + #13#10
     +'User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)' + #13#10
     +'Accept-Encoding: gzip, deflate' + #13#10
     +'Host: www.china95.net' + #13#10
     +'Content-Length: 184' + #13#10
     +'DNT: 1' + #13#10
     +'Connection: Keep-Alive' + #13#10
     +'Cache-Control: no-cache';
      ls := TStringList.Create;
      ls.Add('name=李健');
      ls.Add('area=广东深圳');
      ls.Add('sex=1');
      ls.Add('year=2003');
      ls.Add('month=10');
      ls.Add('date=11');
      ls.Add('hour=9');
      ls.Add('minute=11');
      ls.Add('jingdu=120');
      ls.Add('jingdufen=0');
      ls.Add('taiyang=0');
      ls.Add('quanpai=1');
      ls.Add('submit=在线排八字盘');
      lstr := IdHTTP1.Post('http://www.china95.net/PAipan/bazi/bazi_show.asp',ls);
      FreeAndNil(ls);
      lstr := Copy(lstr,Pos('<td><b>姓名',lstr) - Length('<td><b>姓名'),Length(lstr));
      lstr := Copy(lstr,1,Pos('<br><br><p></td>',lstr) + Length('<br><br><p></td>')) ;
      lstr := StringReplace(lstr,'元亨利贞网四柱八字在线排盘系统','',[rfReplaceAll]);
      lstr := StringReplace(lstr,'http://bbs.china95.net','',[rfReplaceAll]);
      Memo3.Text := lstr;
      lss := TMemoryStream.Create;
      Memo3.Lines.SaveToStream(lss);
      loadstream(WebBrowser1,lss);
      FreeAndNil(lss);
    end;

    http://blog.csdn.net/y281252548/article/details/52786612

  • 相关阅读:
    线程池的优雅关闭实践
    InheritableThreadLocal原理解析
    线程池踩坑
    两个线程通讯(生产-卖面包问题)
    谈谈redis的热key问题如何解决
    中国软件杯选题A1数据智能分析报告系统
    《程序员的思维修炼》读后感
    《算法导论》读后感
    《重构》读后感
    《代码整洁之道》读后感
  • 原文地址:https://www.cnblogs.com/findumars/p/5971933.html
Copyright © 2011-2022 走看看