You are here

public function AcquiaLiftAPI::ping in Acquia Lift Connector 7.2

Executes a ping request

Return value

bool TRUE if the connection succeeded, FALSE otherwise.

File

includes/AcquiaLiftAPI.inc, line 345

Class

AcquiaLiftAPI

Code

public function ping() {
  $url = $this
    ->generateEndpoint("ping");
  $fail_msg = 'Acquia Lift Testing Service could not be reached';
  try {
    $response = $this
      ->makeGetRequest($url, array(), $fail_msg);
    if (!empty($response)) {
      return TRUE;
    }
  } catch (Exception $e) {
    return FALSE;
  }
  return FALSE;
}