headers['Authorization'])) { $auth = base64_decode(preg_replace('/Basic */', '', $this->headers['Authorization'])); $authData = explode(':', $auth); self::$authData['username'] = $authData[0]; self::$authData['password'] = $authData[1]; } // if failed, attempt to fetch from $_SERVER array instead else if (isset($_SERVER['PHP_AUTH_USER'])) { self::$authData['username'] = $_SERVER['PHP_AUTH_USER']; self::$authData['password'] = $_SERVER['PHP_AUTH_PW']; } } } ?>