Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ajax/trackuser.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ function SaveScreenshot(){
'link-click'=>'User has clicked the link.',
'right-click'=>'User has clicked Right Button of the Mouse.',
'copy'=>'User has copied web page content.',
'page-load'=>'User has loaded the web page.',
'change'=>'User has changed a form field on the web page.',
);

$filteredData=substr($_POST['image_code'], strpos($_POST['image_code'], ",")+1);
Expand All @@ -29,7 +31,7 @@ function SaveScreenshot(){

//SAVE EVENT LOG
$file_content = @file_get_contents("../screenshot/event-log.log");
$file_content.="\n ".$event_log_array[$_POST['event_name']].". Image : ".$filename.". Time : ".date("Y-m-d-H-i-s").". IP Address : ".$_SERVER['REMOTE_ADDR'];
$file_content.="\n ".$event_log_array[$_POST['event_name']].". Image : ".$filename.". Time : ".date("Y-m-d-H-i-s").". IP Address : ".$_SERVER['REMOTE_ADDR']." - ".$_SERVER['HTTP_REFERER'];

file_put_contents("../screenshot/event-log.log", $file_content);
}
Expand Down
4 changes: 3 additions & 1 deletion js/trackuser.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ $(document).ready(function(){
window.addEventListener("copy", function(){TrackUserActivity.CaptureScreen('copy')});
window.addEventListener("beforeprint", function(){TrackUserActivity.CaptureScreen('print')});
window.addEventListener("contextmenu", function(){TrackUserActivity.CaptureScreen('right-click')});
});
window.addEventListener("load", function(){TrackUserActivity.CaptureScreen('page-load')});
window.addEventListener("change", function(){TrackUserActivity.CaptureScreen('change')});
});