Autor Beitrag
Delphi2009lover
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: Mo 26.10.09 19:36 
Hi,

wollt nur fragen wie man die IP einer Webseite angezeigt bekommen kann, also so wie bei der cmd.exe mit dem Befehl ping^^ das wars schon^^

Vielen vielen Dank schon im Vorraus!!!
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 26.10.09 19:51 
Moin!

Willst du nur den Hostnamen in eine IP auflösen oder hast du schon eine Verbindung? In letzterem Fall sollte sich die IP bereits irgendwo im verwendeten Wrapper aufhalten. Im ersten Fall ist gethostbyname dein Freund. ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Delphi2009lover Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: Mo 26.10.09 19:58 
Sry das hatte ich schon und verstehe ehrlich gesagt versteh ich nixx könntet ihr ein kleines bsp machen, in dem die IP der Seite GOOGLE.DE angezeigt wird, also 74.125.39.147^^
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 26.10.09 20:37 
Moin!

Wo bleibt denn die Eigeninitiative? :zwinker: Eine Suche nach Suche in: Delphi-Forum, Delphi-Library PING GETHOSTBYNAME liefert gleich als erstes diesen Beitrag, da ist eine Wrapper-Funktion und ein Beispiel drin. :les: :think:

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Delphi2009lover Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: Mo 26.10.09 21:38 
Also dann stell ich meine Frage um, www.delphi-treff.de/...ternet/indy/page/12/ hier geht das ja anscheinend, aber wie wurde das gemachtmit dieser Komponente^^
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 26.10.09 21:44 
Moin!

user profile iconDelphi2009lover hat folgendes geschrieben Zum zitierten Posting springen:
www.delphi-treff.de/...ternet/indy/page/12/ hier geht das ja anscheinend,
Nein, das ist etwas ganz anderes, hier geht´s um die lokale IP-Adresse. ;)

user profile iconDelphi2009lover hat folgendes geschrieben Zum zitierten Posting springen:
aber wie wurde das gemachtmit dieser Komponente^^
So, wie auf der Seite beschrieben. :les: Aber das ist nicht das, was du machen möchtest. :idea:

Wenn du so einen einfachen API-Call nicht auf die Kette kriegst oder "verstehst" (trotz Beispiel-Code und fertiger Unit, die man einfach nur benutzen müsste), solltest du vielleicht etwas probieren, das du verstehst - oder dich mal etwas mit den Grundlagen beschäftigen... :? :nixweiss:

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Delphi2009lover Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: Mo 26.10.09 22:04 
es ist halt ein recht langer Code
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 26.10.09 22:24 
Moin!

user profile iconDelphi2009lover hat folgendes geschrieben Zum zitierten Posting springen:
es ist halt ein recht langer Code
Hab ich was verpasst? :gruebel:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
uses
  ..., Ping, WinSock;

  var
    IPv4: in_addr;
begin
  if GetIPByName('www.google.de',IPv4) then
    ShowMessage(inet_ntoa(IPv4));
cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Delphi2009lover Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: Mo 26.10.09 22:40 
Neh^^ eher ich xDDDDD thanks