Skip to content
Snippets Groups Projects
Commit e7135f8a authored by Olav Morken's avatar Olav Morken
Browse files

Added cookie debug tool.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@863 44740490-163a-0410-bde0-09ae8108e29a
parent 3ee2ef37
No related branches found
No related tags found
No related merge requests found
<?php
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
if(array_key_exists('delete', $_GET)) {
$deleteId = $_GET['delete'];
setcookie($deleteId, '', time() - 24*60*60);
setcookie($deleteId, '', time() - 24*60*60, TRUE);
header('Location: cookie.php');
exit;
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Cookie debug</title>
</head>
<body>
<h1>Current cookies</h1>
<table>
<tr><th>Name</th><th>Value</th><th>Delete</th></tr>
<?php
foreach($_COOKIE as $name => $value) {
echo '<tr>';
echo '<td>' . htmlspecialchars($name) . '</td>';
echo '<td>' . htmlspecialchars($value) . '</td>';
echo '<td><a href="?delete=' . htmlspecialchars($name) . '">Delete</a></td>';
echo '</tr>';
echo "\n";
}
?>
</table>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment