Query: gethostbyname
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
GETHOSTBYNAME(3) 1 GETHOSTBYNAME(3) gethostbyname - Get the IPv4 address corresponding to a given Internet host nameSYNOPSISstring gethostbyname (string $hostname)DESCRIPTIONReturns the IPv4 address of the Internet host specified by $hostname.PARAMETERSo $hostname - The host name.RETURN VALUESReturns the IPv4 address or a string containing the unmodified $hostname on failure.EXAMPLESExample #1 A simple gethostbyname(3) example <?php $ip = gethostbyname('www.example.com'); echo $ip; ?>SEE ALSOgethostbyaddr(3), gethostbynamel(3), inet_pton(3), inet_ntop(3). PHP Documentation Group GETHOSTBYNAME(3)
| Related Man Pages |
|---|
| gethostbyaddr(3) - bsd |
| gethostent(3) - bsd |
| sethostent(3) - bsd |
| geoip_country_code3_by_name(3) - php |
| getmxrr(3) - php |
| Similar Topics in the Unix Linux Community |
|---|
| regarding gethostbyname() |
| gethostbyname_r returns NULL when hostname has dash |
| gethostname warning |
| gethostbyname failed |
| The system function gethostbyname() failed to find the client's host name |