[Perl] Funcion getmyip()

Iniciado por BigBear, 12 Octubre 2011, 16:45 PM

0 Miembros y 1 Visitante están viendo este tema.

BigBear

Hola a todos.

Aca les dejo una funcion que hice para reconocer nuestra IP sin necesidad de usar paginas webs con ese molesto servicio online


Código (perl) [Seleccionar]
#By Doddy H
use IO::Socket;

sub get_ip {
my $get = gethostbyname("");
return inet_ntoa($get);
}



Ejemplo de uso

Código (perl) [Seleccionar]

print get_ip();