...

View Full Version : Spam\Time Controal Question



Bakusozoku
03-03-2006, 04:07 PM
I have a comment thing in my site, how do I set spamcontrol like thing?
The comment is IP based, so everyone can post, but someone can post in certain tutorial each 5 minutes.
Can somebody help me?

degsy
03-03-2006, 04:50 PM
It's probably a bad way to go about it because a group of users could have the same IP.

I'm guessing that you have a database. You can add a field for IP Addresses and Time.
When a post is made you can check against the table for the IP and Time. If it exists within the last 5 mins then dissalow, if not then add the comment and update the IP table

Bakusozoku
03-03-2006, 05:44 PM
Well, that was my thought, but the question is how :P

degsy
03-06-2006, 03:07 PM
It's pretty impossible to say how. There would be different methods depending on how the script works, if it has a database, what fields are in the database, if it uses sessions or just IP Addresses.

Bakusozoku
03-06-2006, 04:26 PM
It's probably a bad way to go about it because a group of users could have the same IP.

So I guess it'd be based on sessions...

felgall
03-06-2006, 09:18 PM
If you save the ip address and time of posting along with each post then you can simply retrieve any entries for the current ip address in descending time order and if that time is less than 5 minutes ago then disallow the post.

If the ip address is reallocated to a different person then the chances of them trying to post is so close to zero as to not be worth worrying about. I use a 15 minute test in a script where I only expect each person to post one message.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum