D7: getHostName or IP address from database