Created
May 10, 2013 14:44
-
-
Save MissAllSunday/5554848 to your computer and use it in GitHub Desktop.
check API status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function getAPIStatus() | |
{ | |
$apiUrl = 'https://status.github.com/api/status.json'; | |
$check = json_decode($this->fetch_web_data($apiUrl)); | |
if (empty($check)) | |
return false; | |
if (!empty($check) && is_object($check)) | |
return $check->status == 'good' ? true : false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment