Hello,

I want to create a DDoS prevention script, but I don't know which is the best way to go about it.

What I was thinking is that, when a user attempts to connect to the website, it records their IP and then if there is loads of traffic, it then kicks them off the website?

Also, is there a way in PHP that you can check to see which packets are being sent to the server, and, if there is a large amount of packets coming into the server it then refuses entry?

Thanks.

$ip = $_SERVER['REMOTE_ADDR'];

check user ip how many times it access to your website then try to use captcha

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.