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;
    }
  }