Autor Beitrag
Palmm130
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 26



BeitragVerfasst: Do 12.07.07 10:44 
Hallo erst ma,

Heute möchte ich gerne wissen, wie ich aus meinem Delphi Programm heraus überprüfen kann, ob eine Datei (meiner Wahl ;)) Online verfügbar ist, oder nicht. Die Datei muss nicht unbedingt heruntergeladen werden.

Alternativ würde es mir reichen einen Server anzupingen und den Ping zurückzubekommen...

hätte wer ne Idee für mich ?

Ich verfüge über BDS 2006

Moderiert von user profile iconTino: Überflüssige Zeilenumbrüche entfernt.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 12.07.07 11:39 
Wenn du wissen willst, ob eine Datei vorhanden ist, dann reicht ein Ping nicht.
Wenn es über das HTTP Protokoll sein soll, dann kannst du einen HEAD-Request machen.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Palmm130 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 26



BeitragVerfasst: Do 12.07.07 12:35 
ähm... und wie ? :D
ich weiß, dass ein Ping da ist, um die Reaktionszeit zu einem Server zu messen... das würde für mich aber auch reichen, kann ich über das Kommandozeilen Ping die Reaktionszeit in Delphi reinbekommen ? wenn ja, ein kleines Beispiel fänd ich ganz toll ;)

http oder ftp is mir einerlei :D
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 12.07.07 12:58 
also wenn du nur pingen willst, dann such mal nach Suche in der Entwickler-Ecke PING. Da gibts recht viele Codes und auch Komponenten, die das für dich machen.
Wenn du prüfen willst, ob eine Datei auf einem Server existiert, dann nimm die INDY Komponenten für den HEAD-Request.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Do 12.07.07 13:00 
Indy hätte noch den Vorteil, dass du die Datei direkt - falls es eine Textdatei ist - auslesen, oder eben über Indy herunterladen kannst.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Palmm130 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 26



BeitragVerfasst: Do 12.07.07 13:13 
hmmm... cool, danke euch :D