Caution!
We are not developers of Mousotron software/application.
Mousotron is a mouse and keyboard activity monitor and keeps statistics of your mileage. It's like an odometer or tripometer for your mouse cursor.
It calculates just how far your mouse cursor has traveled on your screen and how many times the mouse buttons were clicked. Also the number of keystrokes on your keyboard are counted.
More info on official website
This script help you safe data sended (imported/uploaded) from Mousotron to CSV file on your own server/website.
(With small modification you cold save data to Database for e.g. MySQL)
This data you can import/open in any Spreadsheet aplication (with support CSV) like LibreOffice or OpenOffice.
Also you can open this file in any onother text based editor.
This script is tested and developed on Mousotron versio 11.00
PHP script will set file permission for writting to CSV file when is used/executed.
In template is prepared first line with names for columns (this line must be separated - add new line after it).
Data will be added to new line.
dist=2340&lb=243&rb=9&dc=45&ks=535&mb=0&scr=973&reset=20160415&m2=0&m3=0&al=test_pc&mac=30F9EDD40532&cmt=test_comment&ver=11.0
dist=2340
&lb=243
&rb=9
&dc=45
&ks=535
&mb=0
&scr=973
&reset=20160312
&m2=0
&m3=0
&al=test_pc
&mac=30F9EDD40532
&cmt=test_comment
&ver=11.0
This data are saved in to CVS file "data.csv".
dist : distance
lb : left button clicks
rb : right button clicks
dc : double clicks
ks : keystrokes / count of hits on keyboard
mb : middle button clicks
scr : mousewheel scrolls
reset : reset date / count start
m2 : currently not used
m3 : currently not used
al : alias / data source name
mac : (...not sure maybe unique identifier)
cmt : comment
ver : mousotron version
datetime : curent date and time when was data imported/uploaded (not part of mousotron)
CSV file format setup:
dist;lb;rb;dc;ks;mb;scr;reset;m2;m3;al;mac;cmt;ver;datetime
<?php
if( !empty($_POST) ){
chmod('data.csv',0666);
$qi = array(
'dist' => @$_POST['dist'],
'lb' => @$_POST['lb'],
'rb' => @$_POST['rb'],
'dc' => @$_POST['dc'],
'ks' => @$_POST['ks'],
'mb' => @$_POST['mb'],
'scr' => @$_POST['scr'],
'reset' => @$_POST['reset'],
'm2' => @$_POST['m2'],
'm3' => @$_POST['m3'],
'al' => @$_POST['al'],
'mac' => @$_POST['mac'],
'cmt' => @$_POST['cmt'],
'ver' => @$_POST['ver'],
'datetime' => date('Y-m-d H:i:s')
);
//CSV or TXT data imput
//add data to CSV file to end of file
$fp = fopen('data.csv', 'a');
fputcsv($fp, $qi, ';', '"');//PHP5 >
//fwrite($fp, implode(';', $qi) . "\n");//PHP 4
fclose($fp);
// OR insert data to database...
}else{
echo 'No data input!';
}
?>
.zip file for download
initial simple release