domain_check_response

Definition

domain_check_response($domain)
domain_admin.inc, line 722

Description

Checks to see if the webserver returns a valid response for a request to a domain.

Parameters

$domain An array containing the record from the {domain} table

Code

function domain_check_response($domain) {
  $url = domain_get_path($domain);
  $response = drupal_http_request($url);
  if ($response->code != 200) {
    drupal_set_message(t('%server is not responding and may not be configured correctly at the server level.
      Server code !code was returned.'
,
    array('%server' => $url, '!code' => $response->code)), 'warning');
  }
}