Mega Code Archive

 
Categories / Delphi / LAN Web TCP
 

How to get the IP Address bhind a routerproxy

Title: How to get the IP-Address bhind a router/proxy procedure TForm1.Button1Click(Sender: TObject); var IPSTR, IP, HP: string; BeginIP, EndIP, i: integer; begin Button1.Enabled := False; HP := ¡®http://www.my-server.de/cgi-bin/GiveMeMyIp.pl¡¯; NMHTTP1.Get(HP); IPSTR := (NMHTTP1.Body); BeginIP := Pos('BEGINIP', IPSTR) + Length('BEGINIP'); EndIP := Pos('ENDIP', IPSTR); IP := ''; for i := BeginIP to ENDip - 1 do begin IP := IP + IPstr[i]; end; label1.Caption := IP; Button1.Enabled := True; end;