Jump to content

Upload Script.. POST X Amount 30 seconds each session


Recommended Posts

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

 

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.