public static serviceWeb ( string $url, &$err_code, &$output ) : boolean | ||
$url | string | the service to access. |
return | boolean | true on success, false otherwise (in this later case, $err_code gives the reason why it failed and $output contains an error message). |
public static function serviceWeb($url, &$err_code, &$output)
{
phpCAS::traceBegin();
phpCAS::_validateProxyExists();
try {
$res = self::$_PHPCAS_CLIENT->serviceWeb($url, $err_code, $output);
} catch (Exception $e) {
phpCAS::error(get_class($e) . ': ' . $e->getMessage());
}
phpCAS::traceEnd($res);
return $res;
}
function getConnexionBar() { if (CASUser::checkAuth()) { $service = SITE_CAS_CONNEXIONBAR_URL; phpCAS::serviceWeb($service, $err_code, $output); $xml = simplexml_load_string($output); $result = $xml->xpath('/reportoutput/reportdata'); return html_entity_decode($result[0]->asXML()); } else { return ""; } }