4 $session_files = array_slice($argv, 1, $argc - 1);
5 if(count($session_files) < 1 or $session_files[0] == '--help')
7 die("Usage: $argv[0] files\n");
10 exec("mktemp -d", $output, $code);
11 if($code != 0) die($code);
12 $temp_dir = $output[count($output)-1];
13 echo "TMPDIR=$temp_dir" . PHP_EOL
;
14 session_save_path($temp_dir);
16 foreach($session_files as $file)
19 session_decode(file_get_contents($file));
25 exec("rm -r ".escapeshellarg($temp_dir), $output, $code);
26 if($code != 0) die($code);