Autor Beitrag
NOS1971
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 193

Windows 8.1 PRO 64 Bit
Delphi XE7 Professional
BeitragVerfasst: Mo 18.03.13 22:32 
Hallo,

ich suche einen weg aus einer gegebenen URL die IP zu ermitteln. Ist soetwas möglich ?

Grüße,

Andreas


Zuletzt bearbeitet von NOS1971 am Mo 18.03.13 22:46, insgesamt 1-mal bearbeitet
Mathematiker
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2622
Erhaltene Danke: 1447

Win 7, 8.1, 10
Delphi 5, 7, 10.1
BeitragVerfasst: Mo 18.03.13 22:43 
Auf Kommandozeilenebene
ausblenden Quelltext
1:
ping www.irgendetwas.de					

Mit
ausblenden Quelltext
1:
ping www.entwickler-ecke.de					

erhälst Du z.B. 5.9.106.239.

Beste Grüße
Mathematiker

_________________
Töten im Krieg ist nach meiner Auffassung um nichts besser als gewöhnlicher Mord. Albert Einstein
NOS1971 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 193

Windows 8.1 PRO 64 Bit
Delphi XE7 Professional
BeitragVerfasst: Mo 18.03.13 22:46 
Moderiert von user profile iconNarses: Komplett-Zitat des letzten Beitrags entfernt.

Hi ...

sorry ... ich meinte natürlich innerhalb eines Delphi Programmes :-)
Mathematiker
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2622
Erhaltene Danke: 1447

Win 7, 8.1, 10
Delphi 5, 7, 10.1
BeitragVerfasst: Mo 18.03.13 22:50 
Hallo,
user profile iconNOS1971 hat folgendes geschrieben Zum zitierten Posting springen:
... ich meinte natürlich innerhalb eines Delphi Programmes :-)

Dachte ich mir schon, aber es hätte ja auch anders sein können. :mrgreen:
Sieh mal hier nach:
www.swissdelphicente...showcode.php?id=2228

Beste Grüße
Mathematiker

_________________
Töten im Krieg ist nach meiner Auffassung um nichts besser als gewöhnlicher Mord. Albert Einstein
NOS1971 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 193

Windows 8.1 PRO 64 Bit
Delphi XE7 Professional
BeitragVerfasst: Mo 18.03.13 23:12 
Moderiert von user profile iconNarses: Komplett-Zitat des letzten Beitrags entfernt.

Das ist genau das was ich nicht will ... ich möchte anhand einer gegebenen URL die IP ermitteln und nicht anhand einer IP die URL ... :-)
Mathematiker
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2622
Erhaltene Danke: 1447

Win 7, 8.1, 10
Delphi 5, 7, 10.1
BeitragVerfasst: Mo 18.03.13 23:40 
Versuch's mal damit:
ausblenden volle Höhe 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:
31:
32:
33:
uses
   WinSock;
 
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<>nilAND (Addr^<>nilthen
         begin
           Repeat
             Lines.Add(StrPas(inet_ntoa(Addr^^)) ) ;
             inc(Addr);
           Until Addr^=nil;
         end;
       end;
     finally
      WSACleanup;
     end;
   end;
 end;

Beste Grüße
Mathematiker

_________________
Töten im Krieg ist nach meiner Auffassung um nichts besser als gewöhnlicher Mord. Albert Einstein

Für diesen Beitrag haben gedankt: NOS1971
Frühlingsrolle
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 18.03.13 23:41 
- Nachträglich durch die Entwickler-Ecke gelöscht -


Zuletzt bearbeitet von Frühlingsrolle am Di 19.03.13 14:22, insgesamt 2-mal bearbeitet
Gerd Kayser
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 632
Erhaltene Danke: 121

Win 7 32-bit
Delphi 2006/XE
BeitragVerfasst: Mo 18.03.13 23:51 
user profile iconNOS1971 hat folgendes geschrieben Zum zitierten Posting springen:
ich möchte anhand einer gegebenen URL die IP ermitteln

www.delphipraxis.net...ach-ip-befragen.html

Für diesen Beitrag haben gedankt: NOS1971
NOS1971 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 193

Windows 8.1 PRO 64 Bit
Delphi XE7 Professional
BeitragVerfasst: Di 19.03.13 14:40 
user profile iconGerd Kayser hat folgendes geschrieben Zum zitierten Posting springen:
user profile iconNOS1971 hat folgendes geschrieben Zum zitierten Posting springen:
ich möchte anhand einer gegebenen URL die IP ermitteln

www.delphipraxis.net...ach-ip-befragen.html


Das ist die optimale Lösung denke ich ... vielen Dank !