SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict
    Join Date
    Sep 2005
    Posts
    271
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    PHP methods for finding mouse coordinates?

    I'm not sure if this is even possible x.x But, because I want to check to see if users are using bot programs to click a button over and over again every couple of minutes, I want to see if I can use PHP to grab the coordinates of where there mouse clicks the button.

    If its a bot, surely the Coordinates would always be the same? I'm not too sure about this, but I'm looking into methods for catching cheaters :P

    So is there any methods in PHP which allow me to do such things?

    Thanks,

  2. #2
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    If you use <input type="image" />, the Mouse co-ords will be sent.

    However, a captcha would be much, much more effective.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2008
    Location
    Norwich, Norfolk, England
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Surely javascript is the best technology for what you are trying to achieve?

  4. #4
    SitePoint Addict CWebguy's Avatar
    Join Date
    Mar 2009
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah, PHP is server side, I don't see how it could pick this up.

    Cheers

  5. #5
    Floridiot joebert's Avatar
    Join Date
    Mar 2004
    Location
    Kenneth City, FL
    Posts
    823
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheaters evolve, and always survey the field before cheating. Plan on having to come up with something new about once every few weeks.

  6. #6
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    What I mean is that the <input type="image" /> is designed specifically for submitting the form along with the co-ordinates of the mouse relative to the button.

    But it's not effective at all. If someone was to create a bot for a form like this, it would have random co ordinates sent.

    Javascript is definitely not the best solution - what about people without javascript?

    Your best solution is probably an image showing a simple sum, for which they have to put the correct answer into a textbox. It's easier and quicker than using a 'type what you see' captcha.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  7. #7
    SitePoint Zealot zalucius's Avatar
    Join Date
    Jul 2007
    Location
    Denmark
    Posts
    162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also have in mind, that some people use the keyboard instead of the mouse... should they not be able to submit the form?
    zalucius


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •