Autor Beitrag
Wolle92
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: So 16.09.07 15:01 
Hallo,
kann mir jemand sagen, wie ich die IP-Adresse, die im Internet angezeigt wird, also nicht die Netzwerk-IP-Adresse, mit Delphi herausfinden kann?
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: So 16.09.07 15:04 
Nun ein wirklich zuverlässiges Ergebnis zu bekommen ist sicher schwer, wegen Firewall&Proxy, Router etc.
Eine Idee wäre, www.wieistmeineip.de aufzurufen und die dortige IP zu suchen.

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
Wolle92 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: So 16.09.07 15:14 
im Quellcode der Seite sieht man auch, es ist nicht schwer:
ausblenden Quelltext
1:
<h1 class="ip">Hier steht die IP-Adresse</h1>					


also ungefähr so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
wimip := IdHTTP1.Get('www.wieistmeineip.de');
pos1 := Pos('<h1 class="ip">',wimip)+15;
pos2 := Pos('</h1>',wimip);
ip := Copy(wimip,pos1,pos2-pos1);
Wolle92 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: So 16.09.07 15:24 
Das klappt nicht... gibt immer ein "Connection reset by peer"... woran könnte das liegen?
Calculon
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 676

Win XP Professional
Delphi 7 PE, Delphi 3 PRO
BeitragVerfasst: So 16.09.07 16:02 
ausblenden Delphi-Quelltext
1:
wimip := IdHTTP1.Get('http://www.wieistmeineip.de/');					
Wolle92 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: So 16.09.07 16:07 
Danke!
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: So 16.09.07 23:24 
Moin!

Zu dem Thema haben wir auch einen FAQ-Beitrag! ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.