Is there a function in PHP that will just stop the connection without sending anything to the client? I want to make something that checks if the client can access the website, but if not it will just end the connection without sending it anything (or as less information as it can). What I'm trying to accomplish is that I want to make something that blocks DDOS attacks or just people that are bugging the server. I don't think it's the best way to block them, but it's OK for me.
<?php
$client_blocked = true // Let's say that this person is blocked from the website
if ($client_blocked) {
// close the connection
}
?>