Cless Posted November 13, 2007 Share Posted November 13, 2007 Hello. Is there a way you could block the ability for somebody to have multiple tabs or windows opened on your website? I'm not exactly sure if this would be PHP related, Javascript related, or whatever, so, yeah. Thanks! Quote Link to comment Share on other sites More sharing options...
cunoodle2 Posted November 13, 2007 Share Posted November 13, 2007 It would require a decent amount of processing but what you could do would be something to do with recording their IP address into a mysql database and then check that database every time a new page is opened to see if that IP address is currently already being used at the same time. It would be somewhat difficult to do but would be possible. You may have to go as far as to have an auto-refresh done on each page like once/minute to keep checking or something along those lines. Try it out and post any solution you have on here. Quote Link to comment Share on other sites More sharing options...
Cless Posted November 13, 2007 Author Share Posted November 13, 2007 Hm, I'll try it. Thanks. Quote Link to comment Share on other sites More sharing options...
Psycho Posted November 13, 2007 Share Posted November 13, 2007 Um, that would be a bad idea. You have no way of knowing if the user already has another page open or if they had just closed a browser window for your site and then tried to re-access it. So, they would be effectively blocked from accessing your site again for whatever time period you imlpemented for the time-out. You *could* conceivably implement AJAX to have each page repeatedly "phoning home" to ensure they are still connected, but the user could have JS disabled and many users would consider that a malicious practice. Quote Link to comment Share on other sites More sharing options...
Sleeper Posted November 13, 2007 Share Posted November 13, 2007 I guess I would have to ask in this case what would be the point? You want to limit your users ability to view your site? If you have an issue with someone trying to flood your site you can have your host set ip limits on your domain where it will only allow one ip to connect so many times before it give the ip an error till it drops some of its current connections. Other then that I cant really see a point of limiting your viewers browsing abilities. Quote Link to comment Share on other sites More sharing options...
Cless Posted November 13, 2007 Author Share Posted November 13, 2007 No, it is because my site is an RPG, and people can "double tab" to cheat. However, I've fixed it, though not using detecting multiple tabs. I have used a better way. Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.