You are here

function domain_check_response in Domain Access 5

Same name and namespace in other branches
  1. 6.2 domain.admin.inc \domain_check_response()
  2. 7.3 domain.module \domain_check_response()
  3. 7.2 domain.admin.inc \domain_check_response()

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

1 call to domain_check_response()
domain_edit_form in ./domain_admin.inc
FormsAPI for editing a domain record

File

./domain_admin.inc, line 736
Administration functions for the domain module.

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