Autor Beitrag
cartridge
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 209

Win XP
D4 Prof,D6 Prof
BeitragVerfasst: Di 06.09.05 18:27 
Hallo Leute!

Wie kann ich per kl. Anwendung die IP- Adresse ermitteln, die meinem Router z.B. per ADSL zugewiesen wurde?

Gruß Ingo
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Di 06.09.05 18:52 
du musst einfach www.myip.de.vu runterladen und dann auswerten, bzw andere seiten nutzen die das anzeigen

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
Harry M.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754

Win 2000, XP
D2005
BeitragVerfasst: Mi 07.09.05 02:37 
So zum Beispiel:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
function GetInetClietIP: String;
var
  IdHttp: TIdHttp;
  I : integer;
  StringList: TStringList;
begin
  RESULT := '';
  IdHttp := TIdHttp.Create(nil);
  StringList := TStringList.Create;
  Try
    StringList.Add(IdHttp.get('http://checkip.dyndns.org'));
    for I := 0 to Length(StringList.Text) do begin
      if StringList.Text[I] in [#46#48..#57then RESULT := RESULT+StringList.Text[I];
      end;
  finally
    StringList.Free;
    IdHTTP.Free;
    end;
end;

_________________
Gruß Harry
Et spes me per dies sine te ducat et amor me ferat, si dolor spem tollit.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 07.09.05 02:43 
Warum macht ihr euch es eigentlich immer so schwer? Das
ausblenden Quelltext
1:
2:
3:
<?
print getenv("REMOTE_ADDR");
?>

auf den Server hochladen und einfach mit einer HTTP Komponente wieder runterladen. Da muss man nichts parsen oder rauskopieren:
www.luckie-online.de/myip.php