...

View Full Version : spam prevent



ycpc55
01-04-2007, 07:03 AM
hi
i have a script on my site that will let people email other members is there anyway i can have a timer on it so after some one sends a message they will have to wait 1 minute to send another message?

Shaffer
01-04-2007, 07:48 AM
Well, you add a parameter (collumn) to your database called: "last_minute_sent". Then, you send a query that gets that parameter from the database. Then, you compare it with the acual time...


if ($last_minute_sent = time(m)) { $error = true; $response = "Wait another minute, please."; header(redirect somewhere...);}
else sendMessage();



Shaffer.

ycpc55
01-04-2007, 06:40 PM
hi Shaffer
i don't understand is this all the code i will need?and all i need for the database?sorry im some what new to this thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum