0

The idea was simple. Take the mouse data during general use, and store it into a local database. However, then I learned, sadly that you cannot use php! Is there any way to, with chrome, to capture window data, such as mouse locations, click locations, and so forth?

I want to simply store event.clientX and event.clientY paired together in some sort of file.

In short, I want it to work the same way it'd work on a single web page if you used the onmousemove event.

Can anyone help explain if this is possible, and a point in the right direction? If it isn't possible, let me know why.

Haibara Ai
  • 10,703
  • 2
  • 31
  • 47
Xenorosth
  • 97
  • 1
  • 9

2 Answers2

1

PHP is server side scripting language.Under any circumstances it has got nothing to do with your requirments. Javascript is what you need as you said.You can get information's about the content clicked, location of click, co-ordiantes etc from javscript. The simplest example program is by just adding this javascript code to end of and HTML file and open the console log box in browser and click on different locations of the browser view port.

<script>
    window.onclick = function(event) {
    console.log(event);
    }
</script>
neo
  • 386
  • 3
  • 13
0

To store captured x/y data, you could try to use an object, like explained here. And then (when collected enought data) use Ajax to send this object to a PHP script... In order to save the collected data to database. This is explained here.

Your next problem will probably be related to the fact that «recording» all mouse movements will create a huge amount of data quite fast.

Community
  • 1
  • 1
Louys Patrice Bessette
  • 33,375
  • 6
  • 36
  • 64