gethostbyname

(PHP 3, PHP 4 , PHP 5)

gethostbyname --  Get the IP address corresponding to a given Internet host name

Description

string gethostbyname ( string hostname )

Returns the IP address of the Internet host specified by hostname or a string containing the unmodified hostname on failure.

Example 1. A simple gethostbyname() example

<?php
$ip
= gethostbyname('www.example.com');

echo
$ip;
?>

See also gethostbyaddr(), and gethostbynamel().

The Broward PHP Usergroup would like to thank the following sponsors.
  • South Florida Web Design

  • South Florida Maids

  • Miami Cleaning Service

  • Broward PHP Usergroup

  • Nationwide Real Estate Agent Directory

  • Fort Lauderdale Web Design

  • Real Estate Agent

  • Gourmet Flavored Coffee

  • convex optimization

  • convex optimization

  • Nationwide Bail Bonds Agent Directory

  • Fort Lauderdale Computer Repair

  • Broward County Computer Repair

  • dance music video

  • Miami Computer Repair