06-06-2011, 02:47 PM
إدا كنت غير متصل مباشرة
اسجب ايبي من المواقع التي تقدم هده الخدمة
اسجب ايبي من المواقع التي تقدم هده الخدمة
PHP كود :
function GetIP(): string;
var
i: Integer;
X, S: AnsiString;
HTTP: TIdHTTP;
begin
HTTP := TIdHTTP.Create(nil);
try
X := HTTP.Get('http://checkip.dyndns.com');
i := AnsiPos('Address:',X);
i := i+9;
while x[i] <> '<' do begin
S := S+x[i];
inc(i);
end;
Result := S;
finally
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Edit1.Text := GetIP;
end;

