note 50709 added to function.sleep

From: Date: Mon, 07 Mar 2005 23:11:02 +0000
Subject: note 50709 added to function.sleep
Groups: php.notes 
Request: Send a blank email to php-notes+get-86074@lists.php.net to get a copy of this message
In response to the posts below about security, you could set a MySQL or Text record using the IP address that was logging in and then the login script would ban anyone who didn't wait the full sleep time because their IP would be in a temporary ban list and their name would only be deleted from that by a command after the sleep command. <?php //This script gets called with login params echo "One moment while we check your username and password. DO NOT press the back button on your browser."; //Put the user's IP address in a text file or MySQL database sleep(5); //5 seconds should be enough //Delete the user's IP address used above //Perform authentication method. //Print some text using an if statement to notify the user whether they were right or wrong. ?> ---- Manual Page -- http://www.php.net/manual/en/function.sleep.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50709 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50709&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50709&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50709&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50709&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50709&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50709&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#86074) next »