Jump to content

I'm making a new site


Gayner

Recommended Posts

going to be a prayre site..

 

like pray4 me dot com or whatever, i'll find a name..

 

but going to have people post pray requests and see what's up

 

I just need some type of flood control code, i dont want people to type in captcha.. but i also want them toonly beaable to post the upload submit button once every other 30seconds for each user session.,

Link to comment
Share on other sites

I'm confused. Are you asking people to build components of your site for you? If so, we have a freelance section for that. Otherwise, instead of asking for code, perhaps googling what you seek, and/or asking members to 'guide' you in the correct direction (such as what to take into consideration, what to research, etc..)

 

But as it stands, it sounds like you're just holding your hands out and expecting code to be dropped into them (metaphorically speaking of course).

Link to comment
Share on other sites

<?php
$last_time = $_COOKIE['last_hit_time'];
$now = time();
$wait = 5;
if(empty($last_time))
{
setcookie('last_hit_time', $now);
}
else
{
if(($last_time + $wait) < $now)
{
die();
}
else
{
setcookie('last_hit_time', $now);
}
}
?>

 

found this somewhere on the net may help u

Link to comment
Share on other sites

if (!isset($_SESSION)) {
    session_start();
}
// anti flood protection
if($_SESSION['last_session_request'] > time() - 30){
    // users will be redirected to this page if it makes requests faster than 2 seconds
    header("location: /flood.html");
    exit;
}
$_SESSION['last_session_request'] = time();

 

this is best 1

Link to comment
Share on other sites

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.