dcsimg
www.webdeveloper.com
Results 1 to 9 of 9

Thread: What do I use for only allowing one browser to connect to my site?

  1. #1
    Join Date
    Nov 2017
    Posts
    6

    What do I use for only allowing one browser to connect to my site?

    I'm going to be making a site that would have a user connect to it to play a random game, we would be offering prizes for people that would win the game, But I want to make it so that only one
    person can be playing, similar to how twitch.tv only allows one viewer count no matter if they have multiple tabs open, that way one person isn't opening say 50 tabs to try and increase their odds of winning

    I assume it must do with token based authentication but I'd like input from people that might have experience, or a better idea how I'd go about setting something like this up

    Thanks in advance

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    22,214
    If you have some sort of user log-in/authentication system, seems like you could link each instance of a game to that user and only allow one such link at a time. If they try to start a new game, then kill any existing game associated with that login first (possibly with some "Are you sure?" warning message before doing so).
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  3. #3
    Join Date
    Nov 2017
    Posts
    6
    hmm, I could make that work. I'll need to experiment with it and see if there is any easy way to try and get around the login-auth (or if we'd just need to straight watch for cheaters)
    Thanks for pointing me in the right direction

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    22,214
    Otherwise all I can think of is a similar limit of one game per IP address -- which could be annoying if 2 different people were legitimately playing from, say, the same household, or coffee shop, or whatever. If you try to depend on some sort of cookie/token sort of thing, with multiple different browsers and launching "private" windows within the same browser, that could probably be circumvented. (Caveat...not my area of expertise, so maybe some actual expert will have a good idea. )
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  5. #5
    Join Date
    Nov 2017
    Posts
    6
    Maybe I'll need it to only do one token/one user but have an IP limit of 3 valid user tokens per 1 IP, even set up reverse lookups to disallow any VPN/Proxy connections to try and reduce IP bouncing :\
    The page and stuff is all really theory at this point (I am making some loosygoosy type of stuff to see how difficult it would be to implement in our already live (non game related) site (our site director is kinda musing about having like a game thing to promote things)

  6. #6
    Join Date
    Nov 2017
    Posts
    6
    Only thing is yea those internet coffee shops would have issues :/

  7. #7
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    5,434
    Bad move limiting by IP address...

    Issue a token per user to identify that device with that users login. Then you can limit one login per person account.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  8. #8
    Join Date
    Nov 2017
    Posts
    6
    Any idea on a good way to ensure only account per user? (I'd worry about a user using multiple accounts using multiple browsers using just a 1-1 auth token)

  9. #9
    Join Date
    Nov 2017
    Posts
    6
    Wait I just thought of something, you can still theoretically get around this but have it so that users signing up will use their cell numbers (ill just blacklist the most common application based numbers like skype)
    then have it so that when they log on it sends them a text, (two-factor but not optional) also when they sign up I'll set it up so that if there is more then like 3 signups for an IP it will be flagged so we see the accounts clustered (then just watch login times, if the flagged account clusters are logging on in a pattern we will see the spike and possible cheating) thanks peeps y'all got me at least in the general ball park

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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