2013-06-19 13:27:14 +02:00
|
|
|
<?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,'/');
|
|
|
|
}
|
2016-10-29 14:05:13 +02:00
|
|
|
session_destroy();
|
2014-03-05 20:12:36 +01:00
|
|
|
$ssl = ((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "" || $_SERVER['HTTPS'] == "off") ? "http" : "https");
|
2013-06-19 13:27:14 +02:00
|
|
|
$url = str_replace("//", "/", $_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])."/index.php");
|
|
|
|
header("Location: $ssl://$url");
|
|
|
|
?>
|