Skip to content

Instantly share code, notes, and snippets.

@sycobuny
Created April 29, 2014 15:39
Show Gist options
  • Save sycobuny/11403961 to your computer and use it in GitHub Desktop.
Save sycobuny/11403961 to your computer and use it in GitHub Desktop.
<?php
$output = '';
foreach (scandir(session_save_path()) as $x => $dir) {
if (!preg_match('/^sess_(.*)/', $dir, $matches)) continue;
ob_start();
session_id($matches[1]);
session_start();
echo "SESSION({$matches[1]}): ";
print_r($_SESSION);
echo "\n";
session_write_close();
$output .= ob_get_clean();
}
echo($output);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment