<?php
require_once 'config.php';
?>
<html>
<head>
<title>
phpCAS proxy example #2</title>
<link rel="stylesheet" type='text/css' href='example.css'/>
</head>
<body>
<h1>
phpCAS proxied proxy example</h1>
<?php require 'script_info.php' ?>
<p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
<h2>Response from service <?php echo $serviceUrl2; ?></h2>
<?php
flush();
// call a service and change the color depending on the result
if (phpCAS::serviceWeb($serviceUrl2, $err_code, $output)) {
echo '<div class="success">';
} else {
echo '<div class="error">';
}
echo $output;
echo '</div>';
?>
</body>
</html>