Page MenuHomec4science

test.php
No OneTemporary

File Metadata

Created
Thu, Oct 31, 22:29

test.php

<?php
require_once("tequila.php");
$client = new TequilaClient();
$client->SetApplicationName('Les Élèves vont à l\'école');
$client->SetWantedAttributes(array('uniqueid','name','firstname','unit', 'unitid', 'where', 'group'));
$client->SetWishedAttributes(array('email', 'title'));
$client->SetApplicationURL('https://localhost:8000/test.php');
#$client->SetCustomFilter('org=EPFL&firstname=John&unit=SC-PME&where=SC-PME/SC-S/ETU/EPFL/CH&group=inbc');
$client->SetCustomParamaters(array ('toto' => 1));
$client->Authenticate();
$org = $client->getValue('org');
$user = $client->getValue('user');
$host = $client->getValue('host');
$key = $client->GetKey();
echo <<<EOT
<html>
<head>
<title>Test Tequila</title>
</head>
<body>
<h3>Test Tequila :</h3>
<pre>
key = $key
org = $org
user = $user
host = $host
EOT;
echo "\nCookies = ";
print_r($_COOKIE);
echo "\nSession = ";
print_r($_SESSION);
echo <<<EOT
</pre>
<p>
<a href="{$_SERVER['PHP_SELF']}">Test session key</a><br/>
</body>
</html>
EOT;
?>

Event Timeline