Jump to content

Upload Script.. POST X Amount 30 seconds each session


Gayner

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.