crimsonmoon Posted May 21, 2007 Share Posted May 21, 2007 Is that a way through coding to stop people from opening 1000 tabs and just refreshing them. I would like to place a limit on the number of tabs someone can have open. Quote Link to comment https://forums.phpfreaks.com/topic/52347-stop-new-tabs/ Share on other sites More sharing options...
MadTechie Posted May 21, 2007 Share Posted May 21, 2007 not really.. depends on the code!! re-design Quote Link to comment https://forums.phpfreaks.com/topic/52347-stop-new-tabs/#findComment-258297 Share on other sites More sharing options...
DJTim666 Posted May 21, 2007 Share Posted May 21, 2007 I'm not quite sure what you are trying to say here, but this is what I have. What you have is a table in MySQL, and you want to make it so people can't just refresh and keep making new entries into the table. This is easy to prevent. There are a few options to solve this problem. A) Just use the sleep(amount of seconds in here) function. That function will hault the script for however many seconds you insert. or B) Download the following file, and follow the instructions. It will stop users from refreshing by telling them they need to wait XX amount of seconds to post again. EDIT: There is a sample of the file on this site; http://typrofiles.110mb.com/ FILE: [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/52347-stop-new-tabs/#findComment-258303 Share on other sites More sharing options...
crimsonmoon Posted May 21, 2007 Author Share Posted May 21, 2007 Basically in my site many are opening tons of tabs and setting them to refresh at certain intervals which creates more load and creates an unfair environment for everyone else. Firefox or Opera does it easily. The only thing to to would be to increase the time allowed before a new page is allowed to open? Quote Link to comment https://forums.phpfreaks.com/topic/52347-stop-new-tabs/#findComment-258318 Share on other sites More sharing options...
DJTim666 Posted May 21, 2007 Share Posted May 21, 2007 Could you post some code or something? Quote Link to comment https://forums.phpfreaks.com/topic/52347-stop-new-tabs/#findComment-258320 Share on other sites More sharing options...
hitman6003 Posted May 21, 2007 Share Posted May 21, 2007 You can't prevent people from opening tabs...what you can do is set a session variable, for example a "last loaded" value that contains a timestamp and the page name...then on each page check that timestamp. If a period of time, say 45 seconds, hasn't passed, then just display a simple text "You must wait ... to refresh this page". Once the time period has gone by, they can load the page, then it resets the timer. Quote Link to comment https://forums.phpfreaks.com/topic/52347-stop-new-tabs/#findComment-258343 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.