程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> Delphi >> Delphi7 安裝ICS,與簡單使用,delphi7安裝ics

Delphi7 安裝ICS,與簡單使用,delphi7安裝ics

編輯:Delphi

Delphi7 安裝ICS,與簡單使用,delphi7安裝ics


官網 http://www.overbyte.be/

下載 OverbyteIcsV816 完成後解壓到E:\Delphi7\OverbyteIcsV816\


1、在library裡加入E:\Delphi7\OverbyteIcsV816\Source目錄。
2、從File->Open中打開E:\Delphi7\OverbyteIcsV816\Install\D7Install.bpg文件。(文件名在其它Delphi版本略有不同)
3、在項目管理器中,右鍵OverbyteIcsD7Design.bpl選擇Build和Install
64位系統
4、將D:\軟件\Delphi777777\bpl\OverbyteIcsD7Design.bpl
       D:\軟件\Delphi777777\bpl\OverbyteIcsD7Run.bpl
拷貝到 C:\Windows\SysWOW64下

就安裝完成了!


//單個網址
function HttpGet(const Url: string; var Html: string): Boolean; var HttpClient: THttpCli; DataLen: Int64; FailMsg: string; begin Result := False; HttpClient := THttpCli.Create(nil); HttpClient.URL := Url; HttpClient.NoCache := True; HttpClient.RcvdStream := TMemoryStream.Create; try try HttpClient.Get; DataLen := HttpClient.RcvdStream.Size; SetLength(Html, DataLen); HttpClient.RcvdStream.Position := 0; HttpClient.RcvdStream.Read(PChar(Html)^, DataLen); Result := True; except on E: EHttpException do begin FailMsg := Format('Failed : %d %s', [HttpClient.StatusCode, HttpClient.ReasonPhrase]); end else raise; end; finally HttpClient.RcvdStream.Free; HttpClient.RcvdStream := nil; HttpClient.Free; end; end;

//用一個THttpCli訪問多個網址,以節省資源
procedure TForm1.Button1Click(Sender: TObject);var aURL,aHtml:string; i:Integer; var HttpClient:THttpCli; DataLen: Int64; var StartTime: Longword; Duration: integer; begin i:=1; HttpClient := THttpCli.Create(nil); HttpClient.NoCache := True; StartTime := GetTickCount; while i<1100 do begin // aURL:= 'http://chengyu.t086.com/cy0/'+inttostr(i)+'.html'; aURL:='http://chengyu.t086.com/cy0/'+inttostr(i)+'.html'; HttpClient.URL := aURL; HttpClient.RcvdStream := TMemoryStream.Create; try HttpClient.Get; DataLen := HttpClient.RcvdStream.Size; SetLength(aHtml, DataLen); HttpClient.RcvdStream.Position := 0; HttpClient.RcvdStream.Read(PChar(aHtml)^, DataLen); ParserHtmlSaveToSQlite(aHtml); Memo1.Lines.Add(aURL); Button1.Caption:=IntToStr(i); HttpClient.RcvdStream.Free; HttpClient.RcvdStream := nil; i:=i+1; except HttpClient.RcvdStream.Free; HttpClient.RcvdStream := nil; i:=i+1; end; end; Duration := GetTickCount - StartTime; Label1.Caption := IntToStr(Duration div 1000) + ' 秒'; HttpClient.Free; end;

 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved