looking for a simple script to protect from POST data floods, by writing to and reading from a text file. the simpler the better. any pros here can help? will be really useful for my latest project!
It would help to know the type of application, but since your signature says "Chat" im hoping it is a chat. This may be able to handle the problem. if($_SESSION['lastMes'] == $_POST['mes']){ //User is flooding, handle as appropriate } else { //User is not flooding //Set lastMes var with new value $_SESSION['lastMes'] = $_POST['mes']; //Handle as appropriate } PHP: e39m5
e39m5, it's not for chat, it's for an admin system of updating content on a website. posted data will be URLs and anchor text of links on a site. gibex, i think your strategy could work well. how would you code it in the simplest way?