You are here

function domain_check_response in Domain Access 6.2

Same name and namespace in other branches
  1. 5 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_form in ./domain.admin.inc
FormsAPI for editing a domain record

File

./domain.admin.inc, line 659
Administration functions for the domain module.

Code

function domain_check_response($domain) {
  $url = domain_get_path($domain) . drupal_get_path('module', 'domain') . '/tests/200.png';
  $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');
  }
}