uses
idHTTP;
function GetMyRealIP : String;
var
HTTP : TidHTTP;
text : String;
lc_pos : Integer;
begin
HTTP := TidHTTP.Create(nil);
try
text := HTTP.Get('http://whatismyip.com/');
finally
HTTP.Free;
end;
lc_pos := Pos('WhatIsMyIP.com</title>', text);
text := Copy(text, 1, lc_pos-1);
lc_pos := Pos('Your IP is', text);
text := Copy(text, lc_pos + 10, length(text) - lc_pos + 1);
Result := Trim(text);
end;