W forum znalazlem ponizsza funkcje do sprawdzania zewnetrznego IP :
function GetIP: String;
var
WebAddress, SearchString: string;
TempInt: Integer;
NMHTTP1 : TNMHTTP;
txt : String;
begin
WebAddress := 'http://www.whatismyip.com/';
SearchString := 'Your ip is ';
NMHTTP1 := TNMHTTP.Create(self);
try
NMHTTP1.Get(WebAddress);
except
on E: Exception do
begin
// reakcja na blad, np jak nie moze polaczyc sie z internetem, lub cos takiego.
end;
end;
txt := NMHTTP1.Body;
TempInt:=Pos(SearchString,txt);
txt := Copy(txt,TempInt+Length(SearchString),15);
TempInt:=Pos(' ',txt);
txt:=Copy(txt,1,TempInt);
Result := txt;
end;
Niestety DELPHI pluje sie w lini:
NMHTTP1 := TNMHTTP.Create(self);
Czy molby ktos mi pomóc i powiedziec o co chodzi ?