Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Colaboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #2  
Antiguo 21-09-2006
cecam cecam is offline
Miembro
 
Registrado: may 2006
Ubicación: Girona
Posts: 47
Poder: 0
cecam Va por buen camino
A ver si te sirve esto . . .

Código Delphi [-]
function IP_Publica:string;
  function IsNumeric( T:string ):boolean;
  begin
    Result:=false;
    if (length(T)>0) then
      case T[1] of
          '0'..'9':Result:=true;
      end;
  end;
var
  HTMLBody:string;
  i:integer;
  IdHTTP:TIdHTTP;
begin
  Result:='';
  if   WinInet.InternetGetConnectedState(nil,0)
  then begin
       IdHTTP:=TIdHTTP.Create(Application);
       try
         HTMLBody:=IdHTTP.Get('http://checkip.dyndns.org/');
         for i:=0 to Length(HTMLBody)-1 do begin
             if   IsNumeric(HTMLBody[i])
             or  (HTMLBody[i]='.')
             then Result:=Result+HTMLBody[i];
         end;
       finally
         IdHTTP.Free;
       end;
  end;
end;

Saludos!
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Obtener la IP pública DML Internet 4 22-01-2008 14:11:48
Ip Publica ggram2 Internet 2 05-05-2006 22:45:59
Saber IP pública D@byt Internet 8 18-10-2005 09:29:18
Acceder a un router FunBit Redes 4 04-09-2005 13:52:10
Función Pública. marcoszorrilla Humor 0 29-03-2004 23:44:05


La franja horaria es GMT +2. Ahora son las 09:37:59.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi