this PHP Code help you to have a simple rate limit option to protect the site against DDoS or brute force attacks from IP Stresser It is suitable to Prevent against IP Stresser and booter scripts that want to increase the consumption of your site's resources with a "Slow" method.
see test.php :)
To Prevent against DDoS attacks, you will need an DDoS Protection Service, This plugin may not be effective against large attacks.
An IP stresser is an online tool that is used to attack a server or a website by overwhelming its resources with a flood of Internet traffic. It is often used to test the strength and resilience of a server or a network, but it can also be used maliciously to bring down a website or a service by denying legitimate users access.