Autor Beitrag
Dandrolvorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21



BeitragVerfasst: So 24.04.05 21:38 
Ich hab zwar im Forum lange gesucht, aber nix gefunden ... ich möchte die IP einer URL herausfinden ... doch wie?
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: So 24.04.05 21:47 
Umständlich: erstelle eine Pipe mit der du console ouotput un TStringList umleitest und ping die seite an... dann bekommst du sowas:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
Ping http://www.jayy.de [80.190.241.74] mit 32 Bytes Daten:



Antwort von 80.190.241.74: Bytes=32 Zeit=50ms TTL=58

Antwort von 80.190.241.74: Bytes=32 Zeit=48ms TTL=58

Antwort von 80.190.241.74: Bytes=32 Zeit=45ms TTL=58

Antwort von 80.190.241.74: Bytes=32 Zeit=46ms TTL=58



Ping-Statistik f�r 80.190.241.74:

    Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0 (0% Verlust),

Ca. Zeitangaben in Millisek.:

    Minimum = 45ms, Maximum = 50ms, Mittelwert = 47ms


suche mit Suche in: Delphi-Forum, Delphi-Library POS nach der ersten [ und schnapp dir den inhalt mit Suche in: Delphi-Forum, Delphi-Library COPY.

Die Pipefunktion must du nichtmal selber schreiben, die gibts hier: Suche in: Delphi-Forum, Delphi-Library GETCONSOLEOUTPUT

bei mir wars glaub der vierte thread oder so...

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.


Zuletzt bearbeitet von JayEff am So 24.04.05 22:42, insgesamt 2-mal bearbeitet
demo88
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 160

Ubuntu 6.04, Win XP
Delphi 7
BeitragVerfasst: So 24.04.05 22:20 
Das ganze geht auch einfach mit der Funktion:

ausblenden Delphi-Quelltext
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:
function GetIpAddressByName(const Lines:TStrings; const AHost: String): Boolean;
type
  PPInAddr= ^PInAddr;
var
  WSA: TWSAData;
  HostInfo: PHostEnt;
  Addr: PPInAddr;
begin
  Result:=False;
  if WSAStartUp($101, WSA) = 0 then
  begin
    Try
      HostInfo:= getHostByName(PChar(AHost));
      Result:=HostInfo<>nil;
      if Result then
      begin
         Addr:=Pointer(HostInfo^.h_addr_list);
         if (Addr<>nil) AND (Addr^<>nil) then
         begin
           Repeat
             Lines.Add(StrPas(inet_ntoa(Addr^^)) ) ;
             inc(Addr);
           Until Addr^=nil;
         end;
      end;
    Finally
      WSACleanup;
    End;
  end;
end;

_________________
"Das ist kein Bug, das ist ein Feature..."