public function getIP($hostname)
  {
    // If host already was queried
    if (isset($this->host_ip_array[$hostname]))
    {
      return $this->host_ip_array[$hostname];
    }
    
    // Else do DNS-query
    else
    {
      $ip = gethostbyname($hostname);
      $this->host_ip_array[$hostname] = $ip;
      return $ip;
    }
  }
public function getIP($hostname)
  {
    // If host already was queried
    if (isset($this->host_ip_array[$hostname]))
    {
      return $this->host_ip_array[$hostname];
    }
    
    // Else do DNS-query
    else
    {
      $ip = gethostbyname($hostname);
      $this->host_ip_array[$hostname] = $ip;
      return $ip;
    }
  }
public function getIP ( $ hostname ) { // If host already was queried
 if ( isset ( $ this -> host_ip_array [ $ hostname ] ) ) { return $ this -> host_ip_array [ $ hostname ] ; } // Else do DNS-query
 else { $ ip = gethostbyname ( $ hostname ) ; $ this -> host_ip_array [ $ hostname ] = $ ip ; return $ ip ; } }
Returns the IP for the given hostname.

@return string The IP-address.
Returns the IP for the given hostname .