Sinisterly
PHP Script Anti Flood DDOS - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: PHP (https://sinister.ly/Forum-PHP)
+--- Thread: PHP Script Anti Flood DDOS (/Thread-PHP-Script-Anti-Flood-DDOS)



PHP Script Anti Flood DDOS - Simbaa - 11-30-2012

PHP Code:
<?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: www.google.com"); exit; } $_SESSION['last_session_request'] = time(); ?
>


RE: PHP Script Anti Flood DDOS - Nefarious - 11-30-2012

So since I am rubbish at coding would i put this in the index?


RE: PHP Script Anti Flood DDOS - Simbaa - 11-30-2012

Well
It should be the part of every page on your web as it would try to divert the traffic hitting on the pages of your web.


RE: PHP Script Anti Flood DDOS - turkish-hacker - 12-01-2012

Nice keep up good work Smile


RE: PHP Script Anti Flood DDOS - SQLi - 12-02-2012

(11-30-2012, 02:42 PM)Three Wrote: So since I am rubbish at coding would i put this in the index?

You would put it wherever you have your website, and then do a include(); in all files that the clients can access.


RE: PHP Script Anti Flood DDOS - Ultimatum - 12-12-2012

^ That works well, but I feel sorry for Google D:


RE: PHP Script Anti Flood DDOS - Guac - 12-12-2012

(12-12-2012, 01:18 PM)Ultimatum Wrote: ^ That works well, but I feel sorry for Google D:

Even if you used 10 dedicated servers, it wouldn't even make Google flinch, they would literally laugh at you. The server would laugh so hard that its screws would come out.


RE: PHP Script Anti Flood DDOS - MineCrack - 12-12-2012

This is inefficient. They're better ways to go about protecting your server.


RE: PHP Script Anti Flood DDOS - YP. - 12-12-2012

Oh Smile
Nice share! Im deffinitly going to try it


RE: PHP Script Anti Flood DDOS - KyleFYI - 02-21-2013

This would only work for HTTP floods, but its stupid anyway. The attack is already reaching your server... By the time it redirects it would be on a new connection anyway. Witch means the script would be executing again...