Jump to content
MakeWebGames

Forum post time


Recommended Posts

should be something in the lines of

<?php
$block_time = 5 * 60; // minutes * seconds
$block_post = 3;        // amount of posts before being "blocked"
$res = $db->query("SELECT COUNT(*) AS 'posts' FROM forum_posts WHERE fp_poster_id = {$ir['userid']} AND fp_time > (unix_timestamp() - $block_time)");
$row = $db->fetch_row($res);

if($row['posts'] >= $block_post)
{
   echo "Anti spam block! You'll have to wait before you can post again";
   $h->endpage();
   exit;
}
?>

 

note: written in the quick reply, so TEST it out first ;)

Link to comment
Share on other sites

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.   Paste as plain text instead

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