gethostbyaddr

Get the Internet host name corresponding to a given IP address

&reftitle.description; ``string``false```gethostbyaddr` `string` `ip`

Returns the host name of the Internet host specified by `ip`.

&reftitle.parameters;

`ip`

- The host IP address.

&reftitle.returnvalues;

Returns the host name on success, the unmodified `ip` on failure, or &false; on malformed input.

&reftitle.examples;

### A simple `gethostbyaddr` example

    <?php
    $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);

    echo $hostname;
    ?>

&reftitle.seealso;

- `gethostbyname`
- `gethostbynamel`