Function GetMyIP:string;
var
xmlhttp:olevariant;
s,p:integer;
temp:string;
begin
result:=emptystr;
xmlhttp:=CreateOleObject('Microsoft.XMLHTTP');
try
xmlhttp.open('GET', 'http://www.findipinfo.com/', false);
xmlhttp.SetRequestHeader('User-Agent','Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3');
xmlhttp.send(null);
except
exit;
end;
if(xmlhttp.status = 200) then
temp:=trim(VarToStr(xmlhttp.responseText));
xmlhttp:=Unassigned;
s:=pos('Address Is:',temp);
if s>0 then
inc(s,11)
else
exit;
temp:=copy(temp,s,30);
s:=pos('<',temp);
if s=0 then exit
else
dec(s);
result:=trim(copy(temp,1,s));
end;