diff options
author | bfabiszewski <github@ushuaia.pl> | 2013-06-19 13:27:14 +0200 |
---|---|---|
committer | bfabiszewski <github@ushuaia.pl> | 2013-06-19 13:27:14 +0200 |
commit | 2c15d1d2344fe32f549f755de24b973822631181 (patch) | |
tree | 5a5051b36c140d54b51039a85721fe73aac46944 /logout.php | |
parent | eeabf5e5a5070084472c2af62b60820595d686f1 (diff) | |
download | RunnerUpLive-2c15d1d2344fe32f549f755de24b973822631181.zip |
phpTrackme 1.0
Diffstat (limited to 'logout.php')
-rwxr-xr-x | logout.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/logout.php b/logout.php new file mode 100755 index 0000000..7a9f6c2 --- /dev/null +++ b/logout.php @@ -0,0 +1,30 @@ +<?php +/* phpTrackme + * + * Copyright(C) 2013 Bartek Fabiszewski (www.fabiszewski.net) + * + * This is free software; you can redistribute it and/or modify it under + * the terms of the GNU Library General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +session_name('trackme'); +session_start(); +$_SESSION = NULL; +if (isset($_COOKIE[session_name('trackme')])) { + setcookie(session_name('trackme'),'',time()-42000,'/'); +} +session_destroy(); +@$ssl = ($_SERVER['HTTPS'] == "" ? "http" : "https"); +$url = str_replace("//", "/", $_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])."/index.php"); +header("Location: $ssl://$url"); +?> |