程序的功能是这样的:连接指定的网站,使用已知的用户名和口令自动登录网站,登录后获取相关的数据存入到本地(可以是文件也可以是本地数据库).大家讨论讨论,给点思路,好久没发贴了,分数太多了,呵呵.

解决方案 »

  1.   

    你说的是登录后获取指定网页的内容吧,用TWebBrowser控件或HTTP类控件都可以。
      

  2.   

    其一,用FTP/http都可以.获取的数据是双方约定好格式的文件.
    其二.用webservice.服务器提供webservice服务,客户端连上后获取数据(xml格式).
      

  3.   

    网页的?
    因为有Cookies和Session
    自己处理很复杂的如果使用Twebbrowser就好办些的,IE内核嘛http://lysoft.7u7.net
      

  4.   

    to ly_liuyang(Liu Yang): 应用程序更好,能不能说详细点呢,我还没什么思路呢.
      

  5.   

    automatic fill out HTML forms with TWebBrowser?  { To test this code put a TWebBrowser and A TButton component on the form }
    function FillForm(WebBrowser: TWebBrowser; FieldName: string; Value: string): Boolean; 
    var 
      i, j: Integer; 
      FormItem: Variant; 
    begin 
      Result := False; 
      //no form on document 
      if WebBrowser.OleObject.Document.all.tags('FORM').Length = 0 then 
      begin 
        Exit; 
      end; 
      //count forms on document 
      for I := 0 to WebBrowser.OleObject.Document.forms.Length - 1 do 
      begin 
        FormItem := WebBrowser.OleObject.Document.forms.Item(I); 
        for j := 0 to FormItem.Length - 1 do 
        begin 
          try 
            //when the fieldname is found, try to fill out 
            if FormItem.Item(j).Name = FieldName then 
            begin 
              FormItem.Item(j).Value := Value; 
              Result := True; 
            end; 
          except 
            Exit; 
          end; 
        end; 
      end; 
    end; 
    //When the document is complete try to fill out the field homepage with the url 
    procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject; 
      const pDisp: IDispatch; var URL: OleVariant); 
    begin 
      if FillForm(WebBrowser1, 'homepage', 'http://www.swissdelphicenter.ch') = False then 
        ShowMessage('Error. Field not available or no Form found.');
    end;// Show the Webbrowser-Progress in Label1 
    procedure TForm1.WebBrowser1ProgressChange(Sender: TObject; Progress, ProgressMax: Integer); 
    begin 
      if ProgressMax = 0 then 
      begin 
        label1.Caption := ''; 
        Exit; 
      end; 
      try 
        if (Progress <> -1) and (Progress <= ProgressMax) then 
          label1.Caption := IntToStr((Progress * 100) div ProgressMax) + '% loaded...' 
        else 
          label1.Caption := ''; 
      except 
        on EDivByZero do Exit; 
      end; 
    end; 
    //For example you can load the page /en/addtip.php to the TWebBrowser 
    //When the document is Complete the form where you can put your homepage 
    //address is filled out 
    procedure TForm1.Button1Click(Sender: TObject); 
    begin 
      Webbrowser1.Navigate('http://www.swissdelphicenter.ch/en/addtip.php'); 
      // Show the Titel of the currently active Webpage in the titlebar 
      // Den Titel der aktuellen Webseite in der Titeleiste anzeigen 
      Caption := Webbrowser1.OleObject.Document.Title; 
    end;
      

  6.   

    用控件,参数都为字符型可保存在文件中如网站地址,ID,PW,便于修改
      

  7.   

    非常感谢 aiirii(ari-求职广州中)!!表单填写后怎么自动提交呢?怎么获取页面的数据呢?
      

  8.   

    Uses TeeURL;procedure TForm1.Button1Click(Sender: TObject);
    Var MyStream : TMemoryStream;
        ErrorCode : HResult;
    begin
      MyStream := TMemoryStream.Create;
      try
        ErrorCode:= DownloadURL('http://www.steema.com/demo.txt',MyStream);
        if ErrorCode=0 then
           Memo1.Lines.LoadFromStream(MyStream)
       else
          ShowMessage( TeeURLErrorMessage( ErrorCode ) );
      finally
        MyStream.Free;
      end;end;