Get IP address using gethostbyname() function
Get IP address using gethostbyname() function
gethostbyname() is used to get the IP address corresponding to a given Internet host name.
Examples code:
$ip = gethostbyname(‘www.mistonline.in’);
echo $ip;
?>One way to discover your IP address automatically:
// need to trim() because whitespace will confuse the name lookup
$myIP = gethostbyname(trim(`hostname`));
echo $myIP;
?>
Incoming search terms:
- javascript gethostbyname (114)
- gethostbyname javascript (38)
- bash gethostbyname (30)
- gethostbyname in javascript (22)
- gethostbyname function (17)
- gethostbyname bash (14)
- gethostbyname2 example (11)
- jquery gethostbyname (2)
- Java Gethostbyname (2)
- perl gethostbyname (1)
- Java getAllHostByName (1)
- gethostname javascript (1)
- getHostByName is ued in java for (1)
- tutorial gethostbyname (1)
Sounds cool……………
hmm nice one…
nice website..
hmm good..
cool..
Good website….
gud one 🙂