You are here

function hosting_ssl_get_ip in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 web_server/ssl/hosting_ssl.nodeapi.inc \hosting_ssl_get_ip()
  2. 7.3 web_server/ssl/hosting_ssl.nodeapi.inc \hosting_ssl_get_ip()
2 calls to hosting_ssl_get_ip()
hosting_nginx_ssl_hosting_site_context_options in web_server/nginx/ssl/hosting_nginx_ssl.drush.inc
hosting_ssl_hosting_site_context_options in web_server/ssl/hosting_ssl.drush.inc

File

web_server/ssl/hosting_ssl.nodeapi.inc, line 120

Code

function hosting_ssl_get_ip($cid) {
  $result = db_query("SELECT h.name AS server_name, ips.ip_address FROM {hosting_ssl_cert_ips} cert INNER JOIN {hosting_ip_addresses} ips ON cert.ip_address = ips.id INNER JOIN {hosting_context} h ON h.nid = ips.nid WHERE cid=%d", $cid);
  $ip_addresses = array();
  while ($row = db_fetch_object($result)) {
    $ip_addresses[$row->server_name] = $row->ip_address;
  }
  return $ip_addresses;
}