Autor Beitrag
TimonWorld
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 397



BeitragVerfasst: Sa 09.10.04 17:53 
Kann man mit Indy eigentlich auch prüfen ob ne Website existiert??? Wenn ja, wie?

THX im Vorraus.

Gruß,Timon
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 10.10.04 18:51 
du kannt die header daten deine URL zurüclgeben lassen. wenn da die größe 0 ist, dann existert die website nicht.
oder du führst nen GET aus und schaust ob ne exception (404) ausgelößt wird.

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



BeitragVerfasst: So 10.10.04 20:06 
hi matze! und wie geht das? bin neu in indy und internet! wie checke ich jetzt richtig nach ob irgendeine url verfügbar ist (source please! :lol: )

gruß
timon
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Mo 11.10.04 08:32 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
function CheckURL(const URL:string):boolean;
begin
 with TidHTTP.Create(nil) do try
  Get(URL);

  Abort; // Jump down ....
 except
  on E:Exception do begin
   Result:=(E is EAbort);
   Free;
  end; 
 end;
end;
Nicht getestet 8)

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.