0

Hello, I have a site about a game and i need if there is some code that helps me to anti-flood, please.thanks!
if anyone can help me I would greatly appreciate

This it's good?

<?PHP

IF (!ISSET($_SESSION)) {
    SESSION_START();
}
// anti flood protection
IF($_SESSION['last_session_request'] > TIME() - 2){
    // users will be redirected to this page if it makes requests faster than 2 seconds
    HEADER("location: /flood.html");
    EXIT;
}
$_SESSION['last_session_request'] = TIME();

?>

Edited by cristian.stilpeanu.3

2
Contributors
1
Reply
2
Views
4 Years
Discussion Span
Last Post by LastMitch
0

@cristian.stilpeanu.3

Hello, I have a site about a game and i need if there is some code that helps me to anti-flood, please.thanks!

I'm a bit confused why you need help with this code that you post above.

I assume you got it from here:

http://www.thewebhelp.com/php/scripts/anti-flood-script/

I think it explained very clearly about where to put it.

Or you can try this one:

https://github.com/desfrenes/Shozu/blob/master/AntiFlood.php

The reason is that there's section where you can post your question and ask for assistant.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.