IP address - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


IP address

Is there an API call to find the IP address of the computer being used? If so, what is it? Thanks in advance :)



  • With Perl,

    $name = (gethostbyname ("localhost"))[0];

    $addr = (gethostbyname ($name))[4]; printf "%s
    ", join ('.', unpack ("C4", $addr));

Sign In or Register to comment.