{Help} PHP Script Anti Flood DDOS

[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: http://www.example.com/403.html”);
exit;
}
$_SESSION[‘last_session_request’] = time();
?>[/code]

Well i need to limit request Per Ip

How can I fix this script ?

Thanks in advanced

Sponsor our Newsletter | Privacy Policy | Terms of Service