More improvemnts and new folderstructure

This commit is contained in:
2015-04-30 22:11:52 +02:00
parent 27e2886de8
commit b11f487816
24 changed files with 2 additions and 812 deletions

32
php/track.php Executable file
View File

@@ -0,0 +1,32 @@
<?php
require __DIR__ . "/lib/class.EmailTracker.php";
$trackingID = "";
$type = "none";
// check which type was logged
if(isset($_GET["img"])) {
$trackingID = $_GET["img"];
$type = "img";
} else if(isset($_GET["sound"])) {
$trackingID = $_GET["bgsound"];
$type = "bgsound";
}
if(!empty($trackingID) && $type !== "none") {
$dbObj = new EmailTracker();
// build our tracking entry
$data = array(
"ip_addr" => $_SERVER["REMOTE_ADDR"],
"referrer" => isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : "",
"client" => isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : "",
"tracking_type" => $type,
"timestamp" => date('Y-m-d H:i:s', time()),
);
// log it to db
$dbObj->addLog($trackingID, $data);
} else {
echo "Powerful you have become, the dark side I sense in you.";
}