Jump to content

posting message question


chris_rulez001

Recommended Posts

hi, im making a forum system and i was wondering if i could have a post delay (flood control).

 

e.g. say if user1 posted a message and then wanted to post again straight after, and then got a custom flood control message.

 

can i ask how would i make it so i could select how long you had to wait before posting another message and  how would i make it so i can select a custom flood control message.

 

i would like the flood control custom message and time limit (in seconds) to be stored in a mysql table.

 

can someone help me please?

 

if this is too confusing, tell me and ill try and simplify it.

 

thanks in advance,

 

chris

Link to comment
https://forums.phpfreaks.com/topic/65461-posting-message-question/
Share on other sites

After the user posts just set the current time to a session and then when they go to post again do:

 

$old_time - $current_time

 

and then if it is within the time then reject their post.

 

I do not do time calculations so I do not know the correct way to store or compare the times so will either have to use the manual or get someone else to help you. SORRY :(

 

~ Chocopi

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.