Skip to content Skip to sidebar Skip to footer

Mouse Position With Ajax In Php

Is it possible to post an Ajax request with a mouse position in PHP? For e.g. i'm fetching a page in cUrl, and on this page I would like to post a mousemovement event. I have no co

Solution 1:

You can use this code for getting mouse position and posting request:

$("#target").mousemove(function(event) {
  $.post("test.php", {x: event.pageX, y: event.pageY});
});

If you need help with doing something with position in PHP, you can ask me.

Post a Comment for "Mouse Position With Ajax In Php"