Jump to content

Stop new tabs


crimsonmoon

Recommended Posts

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]

Link to comment
https://forums.phpfreaks.com/topic/52347-stop-new-tabs/#findComment-258303
Share on other sites

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?

Link to comment
https://forums.phpfreaks.com/topic/52347-stop-new-tabs/#findComment-258318
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/52347-stop-new-tabs/#findComment-258343
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.