Registriert seit: 28. Jul 2005
849 Beiträge
|
Re: Text aus einer HTML-Datei einlesen?
8. Okt 2005, 08:58
Delphi-Quellcode:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, HTTPGet;
type
TForm1 = class(TForm)
Button1: TButton;
HTTPGet1: THTTPGet;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
const
urlText: string = ' http://chrissi1991.ch.ohost.de/update.txt';
procedure TForm1.Button1Click(Sender: TObject);
var
s: TStream;
begin
s := TMemoryStream.Create;
try
http.Get(urlText, s);
s.Position := 0;
Memo1.Lines.LoadFromStream(s);
finally
s.Free;
end;
end;
end.
Weiterhin: [Error] Unit1.pas(36): Undeclared identifier: 'http'
|
|
Zitat
|