You are here

function securepages_test in Secure Pages 5

Same name and namespace in other branches
  1. 6.2 securepages.module \securepages_test()
  2. 6 securepages.module \securepages_test()
  3. 7 securepages.module \securepages_test()

Secure Pages SSL Test

1 call to securepages_test()
securepages_settings in ./securepages.module
Implementation of hook_settings()

File

./securepages.module, line 245

Code

function securepages_test() {

  // If we are in an SSL page then assume that SSL is configured correctly.
  if (securepages_is_secure()) {
    return TRUE;
  }
  $url = 'https://' . preg_replace(';^http[s]?://;s', '', url('admin/settings/securepages/test', NULL, NULL, TRUE));
  $response = drupal_http_request($url);
  return $response->code == 200 ? TRUE : FALSE;
}