How to recognize returning visitors not using cookies?

Discussion in 'Programming' started by lampodiiluce, Jun 9, 2013.

  1. #1
    My coder is working for me on a new game script (mainly coded in php/ajax and javascript).
    This is the problem: i do not want people can cheat the game so i need to identify and recognize each single visitor in unique way. Normal cookies are not a solution since they can be easily deleted.

    What could i to recognize an user in a stealth way so he cannot easily delete the cookies and play multiple times to my game?

    I cannot register the ip in the database because many ISP in my country uses the same ip for multiple users so i would block many users if i ban an ip.

    Is there a way to install a stealth cookie not easy to be deleted or something like that?

    Maybe flash cookies or java cookies??

    Any idea?

    thanx
     
    lampodiiluce, Jun 9, 2013 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,814
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #2
    A cookie is still a cookie regardless of whether it is generated by flash or javascript

    You can use a combination of IP address and user agent - will they think to change browsers? some will, most won't.
    You can register a domain name that is totally unrelated to your site and drop a third party cookie. Unless they clean all cookies they probably won't link that one to your game
     
    sarahk, Jun 9, 2013 IP
  3. aidanriley629

    aidanriley629 Banned

    Messages:
    429
    Likes Received:
    23
    Best Answers:
    3
    Trophy Points:
    175
    #3
    They will clear all their cookies instead of bothering to track down the one from your site. Can't you check if it's the same person based on their username?
     
    aidanriley629, Jun 9, 2013 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    28,814
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #4
    I've been out mountain biking and mulled over your question while I was out. The most effective way would be to SMS a code to their mobile phone - and only send it if the mobile hasn't been used (successfully) before. The question then is: what is the value to you of preventing a second play? How much are you prepared to pay to enforce your rule.
     
    sarahk, Jun 9, 2013 IP
  5. aidanriley629

    aidanriley629 Banned

    Messages:
    429
    Likes Received:
    23
    Best Answers:
    3
    Trophy Points:
    175
    #5
    That's what I was wondering, why can't they play twice? The problem with SMS is that it will be expensive for international people.
     
    aidanriley629, Jun 9, 2013 IP
  6. sarahk

    sarahk iTamer Staff

    Messages:
    28,814
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #6
    That's where he needs to look at the value in enforcing his rule.
     
    sarahk, Jun 10, 2013 IP
  7. jscg

    jscg Well-Known Member

    Messages:
    161
    Likes Received:
    5
    Best Answers:
    3
    Trophy Points:
    108
    Digital Goods:
    2
    #7
    Maybe you should use sessions ? Or random generated sha strings on each user visit ?
     
    jscg, Jun 11, 2013 IP
  8. sarahk

    sarahk iTamer Staff

    Messages:
    28,814
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #8
    sessions won't work if a user switches browser or switches device though. We really need some feedback from lampodiiluce as he has a few suggestions and we don't know what his thoughts are.
     
    sarahk, Jun 11, 2013 IP
  9. xtmx

    xtmx Active Member

    Messages:
    359
    Likes Received:
    12
    Best Answers:
    4
    Trophy Points:
    88
    #9
    I'm guessing he's in the PBBG market, in which case having multiple accounts gives a person unfair advantages (assuming it allows in-game trading of items, which most do).

    Shared Objects are somewhat harder to clear than normal cookies, and if your site is desktop-based, they might be your best option. Here's an example AS3 script:

    import flash.net.SharedObject;
    import flash.net.URLRequest;
    import flash.net.sendToURL;
     
    var object:SharedObject = SharedObject.getLocal("GameName", null, false);
    var flag:String = "";
    if(object.data.flag!=null) {
        flag = String(object.data.flag);
    } else {
        flag = Math.random().toString();
        flag += Math.random().toString();
        flag += Math.random().toString();
        object.data.flag = flag;
    }
    object.flush();
    var request:URLRequest = new URLRequest("/b.php?r="+flag);
    sendToURL(request);
    Code (markup):
    This code generates a random string for every user, stores it as a SharedObject, and then sends it to b.php. Here's the swf:

    http://www.thomasmottl.com/assets/so.swf

    If the string already exists in the database, it's a good bet that they already have an account. This method is not foolproof, but assuming that your site is desktop-based, it may be a decent choice.

    This is just a proof-of-concept.
     
    xtmx, Jun 11, 2013 IP
  10. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #10
    Or people like me who don't have no ***** SMS capable phone.

    Really what you are asking to do is NOT something web technologies are designed to do... and nonsense like using SWF to do it is no different than using a cookie. The MOST I'd do is track users by IP address, and if you have multiples from the same address, flag it for MANUAL review of their activities (since it could be something like brother and sister). UN, e-mail address, that's about as far as you can reasonably go. Anything else is just going to get slapped aside like it wasn't even there.

    Web security is like the door locks on a car -- they are there to keep the honest people out. Anyone determined to get in under another username on a free service is going to slap EVERYTHING listed so far in this thread aside like Magenta Thompson in a blaxploitation film.
     
    deathshadow, Jun 12, 2013 IP
  11. sarahk

    sarahk iTamer Staff

    Messages:
    28,814
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #11
    really? in 2013? My phones get made obsolete so bloody fast because the phone companies change the tech on me every few years (although 3G seems pretty stable and altleast 4G is backward compatible)



    but we really, really need to hear back from the OP
     
    sarahk, Jun 12, 2013 IP
  12. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #12
    Use zombie cookies. I would say it would work for the majority of people (if not all). A great implementation of zombie cookies would be evercookie by Samy:

    http://samy.pl/evercookie/
     
    ThePHPMaster, Jun 14, 2013 IP