![]() |
Reload Flood Control
This is a fairly simple hack. I implemented it a couple days ago. And realized
that it had also been requested by scotty back in June. https://vborg.vbsupport.ru/showthrea...threadid=40297 This hack limits the number of http requests to 1 request per IP address per second. It works for both registered users as well as guests. If a users hits the refresh button more than once per second he will be taken to the error screen. The hack actually terminates the loading process of the page in the early stages and prevents the server load from going up. I have tried the refresh flood with and without this hack. And without the hack I got the server load to go from 0.7 to about 25 with about 30 people logged on. With the hack in place, the same refresh flood caused the load to go as high as 1.2. This hack requires you to create a new template. And it modifies 2 source files: global.php and showthread.php. In admin CP add the following template: error_floodreload Add the following text to the template: Code:
Sorry! The administrator has specified that users can only make one http request every 1 second. Look for the following code: PHP Code:
PHP Code:
Look for the following code: PHP Code:
PHP Code:
Look for: PHP Code:
PHP Code:
the user clicks on the goto newest or goto last post arrows in the forum display. Those 2 calls end up making a second recursive call to showthread.php which ends up being within the same 1 second interval of the click itself. This way you are fooling the flood control so that it wont catch the back to back requests. |
it's a very good idea and a must have hack especially for people having bandwidth problems. IMO it also fixes the gap someone could exploit by sending too many page requests for a long time and thus making your server busy all the times. It wouldnt be a problem for manual sending but a malicious hacker could always code a script to make it automatically and increase your server load dramatically. So great fix..
One minor issue though: it would prevent users open a few pages at the same time when they come to the site. For example when they make a search, they cant anymore open a few threads at the same time by clicking "Open in new browser windows" link. (which I do a lot!). Of course this is not related to you it's the nature of the hack but maybe setting the second to 0.5 instead of 1 may be a little help for these users... |
Thank you for your kind words. :)
We do suffer from high loads on our server. You can actually load multiple pages. I do that all the time. I am willing to bet you money that opening the subsequent windows will take longer than a one second interval. ;) |
Very Great Hack, I have a lot of peoples which refreshs only to kill my board.......
thx |
Has it affected bandwidth at all?
|
Well, I've installed your great Hack, but if I now press the "F5" Key (Refresh) ever and ever I don't see the Antiflood Message....
I've Tryed it very often...... |
MarkB, it will prevent the server load from going up.
The Ghost, can you double check your installation steps and make sure you haven't left anything out? |
Nice.
|
Hi,
I checked it all again and again step by step, but I think it doesn't work for me :( |
|
added it but when i try it out... i don't see the text message??.. the screen pops up.. but not with the line from the template??
I did add it.... |
i added it all... i dont see it either.... please advise, by the way, im using 12 gb and only 450 members, i got a big problem sumwhere and need help.
|
Ok, I updated the instructions and the attachment.
I needed to obtain the proper templateset, replacementset, and style id's in order for the error screen to load properly for those of you who have been having trouble with it. I replaced PHP Code:
PHP Code:
|
did what you suggested but still got the same screen??
see attachment..... |
Is there any way to make this hack affect just non registered members?
|
Does this hack work if you block cookies, and if not, how can I force users to enable cookies or they can't brows my board :D.
Thanks in advance |
Hmmm, I've got a similar problem to Ghost. I installed this hack, following the steps to the letter, loaded a thread, then pressed F5 repeatedly (in fact, I sat there with my finger on the button for about 10 seconds) and the page still loaded for me - no error message at all.
|
Quote:
|
Since the time of last activity in the session table has a granularity of 1 second, there is not much to do to increase the precision of the time.
|
How was Sinan (Logician) talking about doing it?
|
Hi,
Can you maybe make this also for 3.6.5? Best regards Stickers |
Considering Zzed hasnt posted in 2-3 years maybe requesting it instead of bumping a old thread might have been a good idea ;)
|
Good point Zachery :D
|
All times are GMT. The time now is 10:33 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|