1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42:
| unit UHaupt;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, IdHTTP, StrUtils;
type TFAnwendung = class(TForm) BStart: TButton; BEnde: TButton; MText: TMemo; procedure BStartClick(Sender: TObject); private public end;
var FAnwendung: TFAnwendung;
implementation
{$R *.dfm}
procedure TFAnwendung.BStartClick(Sender: TObject); var Text: String; HTTP: TIdHTTP; a, b: Integer; begin HTTP.Create(nil); Text:=HTTP.Get('http://www.hallo.de'); HTTP.Free; a:=(Pos('<meta http-equiv="', Text)); b:=(Posex('" content="', Text, a)); if (a>0) and (b>0) then MText.Text:=Copy(Text, a, b-a); end;
end. |