var
  ParaList :TStringList ;
  Response :TStringStream ;
  HeadURL , QryURL , s , CookieStr : String ;
  i , n : integer ;
  TrackState : Integer ;
FHtmlText : String;
  ReTimes : Integer ; // 重试次数
  s1,s2,s3 : String;
  sDate,sTime : String;
  MainTableMatchStr,SubTableMatchStr,TdMatchStr,TrMatchStr : String;
begin
  HeadURL := 'http://www.ftexpress.com.cn/' ;
  QryURL  := 'http://www.ftexpress.com.cn/cgi-bin/GInfo.dll?EmmisTrack';
  TrackState := 0 ;
  ReTimes := 0 ;
    Inc(ReTimes) ;
    TrackState := 0 ;
    ParaList := TStringList.Create ;
    ParaList.Add('cno='+ '6002030506') ;
    ParaList.Add('hdnGo=frt7bn')  ;
    ParaList.Add('submit.x=10')  ;
    ParaList.Add('submit.y=12')  ;    Response := TStringStream.Create('');
//    FIdHttp := TIdHttp.Create(nil) ;
    try
      FIdHttp.ProtocolVersion := pv1_1;
      FIdHttp.Request.ContentType := 'application/x-www-form-urlencoded' ;
      FIdHttp.Request.Referer := QryURL ;
      FIdHttp.Request.Host := 'www.dpex.com' ;
      FIdHttp.Request.ContentEncoding := 'gzip, deflate' ;
      FIdHttp.Request.ContentLanguage := 'zh-cn'  ;
      FIdHttp.Request.Accept := 'text/html' ;
      FIdHttp.ReadTimeout := 50000 ;  //50 秒      try
        FIdHttp.Post(QryURL ,ParaList, Response ) ;
        FHtmlText := Response.DataString ;
用这种方法读起不出数据来啊。。
有没有高手帮我看看。。我 QQ 183642061 希望高手加我一下。。

解决方案 »

  1.   

    在多线程中利用TWebBrowser控件抓起网页上的数据。。如果有。。能不能把源代码给我看看。。
      

  2.   

    你去掉
    try 
          FIdHttp.ProtocolVersion := pv1_1; 
          FIdHttp.Request.ContentType := 'application/x-www-form-urlencoded' ; 
          FIdHttp.Request.Referer := QryURL ; 
          FIdHttp.Request.Host := 'www.dpex.com' ; 
          FIdHttp.Request.ContentEncoding := 'gzip, deflate' ; 
          FIdHttp.Request.ContentLanguage := 'zh-cn'  ; 
          FIdHttp.Request.Accept := 'text/html' ; 
          FIdHttp.ReadTimeout := 50000 ;  //50 秒 用最简单的.get来看看;
     FIdHttp.Get(QryURL ,Response );
    要是可以,估计你的try里面这堆东西有问题