Registriert seit: 9. Sep 2008
Ort: b.
170 Beiträge
Delphi 7 Enterprise
|
Re: Internet IP / WAN IP herausfinden
3. Jun 2009, 18:27
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
IPSTR, IP, HP: string;
BeginIP, EndIP, i: integer;
begin
Button1.Enabled := False;
HP := ‘[ url]http: //www.my-server.de/cgi-bin/GiveMeMyIp.pl’;[/url]
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;
|
|
Zitat
|