php man page for gethostbyname

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 name

SYNOPSIS
string gethostbyname (string $hostname)
DESCRIPTION
Returns the IPv4 address of the Internet host specified by $hostname.
PARAMETERS
o $hostname - The host name.
RETURN VALUES
Returns the IPv4 address or a string containing the unmodified $hostname on failure.
EXAMPLES
Example #1 A simple gethostbyname(3) example <?php $ip = gethostbyname('www.example.com'); echo $ip; ?>
SEE ALSO
gethostbyaddr(3), gethostbynamel(3), inet_pton(3), inet_ntop(3). PHP Documentation Group GETHOSTBYNAME(3)
Related Man Pages
gethostbyname(3) - bsd
sethostent(3) - bsd
g_h_b_n(3) - minix
inet_pton(3) - php
checkdnsrr(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