GETHOSTBYADDR(3) 1 GETHOSTBYADDR(3)gethostbyaddr - Get the Internet host name corresponding to a given IP addressSYNOPSIS
string gethostbyaddr (string $ip_address)
DESCRIPTION
Returns the host name of the Internet host specified by $ip_address.
PARAMETERS
o $ip_address
- The host IP address.
RETURN VALUES
Returns the host name on success, the unmodified $ip_address on failure, or FALSE on malformed input.
EXAMPLES
Example #1
A simple gethostbyaddr(3) example
<?php
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
echo $hostname;
?>
SEE ALSO gethostbyname(3), gethostbynamel(3).
PHP Documentation Group GETHOSTBYADDR(3)
Check Out this Related Man Page
GETMXRR(3) 1 GETMXRR(3)getmxrr - Get MX records corresponding to a given Internet host nameSYNOPSIS
bool getmxrr (string $hostname, array &$mxhosts, [array &$weight])
DESCRIPTION
Searches DNS for MX records corresponding to $hostname.
PARAMETERS
o $hostname
- The Internet host name.
o $mxhosts
- A list of the MX records found is placed into the array $mxhosts.
o $weight
- If the $weight array is given, it will be filled with the weight information gathered.
RETURN VALUES
Returns TRUE if any records are found; returns FALSE if no records were found or if an error occurred.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | This function is now available on Windows plat- |
| | forms. |
| | |
+--------+---------------------------------------------------+
NOTES
Note
This function should not be used for the purposes of address verification. Only the mailexchangers found in DNS are returned, how-
ever, according to RFC 2821 when no mail exchangers are listed, $hostname itself should be used as the only mail exchanger with a
priority of 0.
Note
For compatibility with Windows before this was implemented, then try the PEAR class Net_DNS.
SEE ALSO checkdnsrr(3), dns_get_record(3), gethostbyname(3), gethostbynamel(3), gethostbyaddr(3), the named(8) manual page.
PHP Documentation Group GETMXRR(3)