Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi fileexists funzt im internet nicht (https://www.delphipraxis.net/132781-fileexists-funzt-im-internet-nicht.html)

StevenArt 19. Apr 2009 17:28


fileexists funzt im internet nicht
 
Ich schreib grad ein gleines Programm des Anzeigt ob meine Serven online oder Offline sind.
Mein problem ist dass es dauernd anzeigt dass die offline sind obwohl di schon ohn sind...

Hier mal der Delphi code:
Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Timer1: TTimer;
    Label2: TLabel;
    Label3: TLabel;
    procedure Timer1Timer(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Timer1Timer(Sender: TObject);
begin
if fileexists ('http://itstefan.kilu.de/1234.TXT') then Label1.Caption:='Online'
else Label1.Caption:='offline' ;

if fileexists ('http://stevenart.kilu.de/1234.TXT') then Label2.Caption:='Online'
else Label2.Caption:='offline' ;

if fileexists ('http://itstefan.bplaced.de/1234.TXT') then Label3.Caption:='Online'
else Label3.Caption:='offline' ;

end;

end.
Hoffe mir kann jemand helfen.

Klaus01 19. Apr 2009 17:44

Re: fileexists funzt im internet nicht
 
Guten Abend,

fileexist hilft Dir nicht viel bei Dateien
die auf einem WebServer gehostet sind.

Schau mal hier im Forum nach URLExists.
Oder baue dir etwas mit Idhttp.head.

Grüße
Klaus

StevenArt 20. Apr 2009 05:36

Re: fileexists funzt im internet nicht
 
Danke... E´Werds mal ausprobieren!


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:11 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz