Gayner Posted November 14, 2009 Share Posted November 14, 2009 IM making a prayre site for users to post there pray's.. so I need to beable to stop flooding for each using, using session function or what? Can somone right a quick simple code of .. if user has post before 30seconds then error: "flood control" How would i go about doing this. I dont wan't to add captcha's or anything cause i hate those but i want to be non spammable. beaing able to post submit button every other 30seconds for each user session. thank u sir EDIT: I got upload script and stuff i mean i know how to do that using the functions just not on flood control $_SESSION each 30second time out if they submit u know Quote Link to comment https://forums.phpfreaks.com/topic/181538-upload-script-post-x-amount-30-seconds-each-session/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 14, 2009 Share Posted November 14, 2009 http://www.phpfreaks.com/forums/index.php/topic,276805.msg1309214.html#msg1309214 Quote Link to comment https://forums.phpfreaks.com/topic/181538-upload-script-post-x-amount-30-seconds-each-session/#findComment-957592 Share on other sites More sharing options...
Gayner Posted November 14, 2009 Author Share Posted November 14, 2009 http://www.phpfreaks.com/forums/index.php/topic,276805.msg1309214.html#msg1309214 That was no help, unfortunaely google exists. if (!isset($_SESSION)) { 03. session_start(); 04.} 05.// anti flood protection 06.if($_SESSION['last_session_request'] > time() - 2){ 07. // users will be redirected to this page if it makes requests faster than 2 seconds 08. header("location: /flood.html"); 09. exit; 10.} 11.$_SESSION['last_session_request'] = time(); Should this work? Quote Link to comment https://forums.phpfreaks.com/topic/181538-upload-script-post-x-amount-30-seconds-each-session/#findComment-957634 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.