chris_rulez001 Posted August 17, 2007 Share Posted August 17, 2007 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 More sharing options...
NArc0t1c Posted August 17, 2007 Share Posted August 17, 2007 Insert a time stamp into the database and check against it? Link to comment https://forums.phpfreaks.com/topic/65461-posting-message-question/#findComment-326865 Share on other sites More sharing options...
chris_rulez001 Posted August 17, 2007 Author Share Posted August 17, 2007 Insert a time stamp into the database and check against it? ok, thanks Link to comment https://forums.phpfreaks.com/topic/65461-posting-message-question/#findComment-326873 Share on other sites More sharing options...
chocopi Posted August 17, 2007 Share Posted August 17, 2007 If your only thinking about doing like a 15 second wait couldnt you just set the timestamp to a session and check against it. This would be much easier than using a db. ~ Chocopi Link to comment https://forums.phpfreaks.com/topic/65461-posting-message-question/#findComment-326910 Share on other sites More sharing options...
chris_rulez001 Posted August 17, 2007 Author Share Posted August 17, 2007 If your only thinking about doing like a 15 second wait couldnt you just set the timestamp to a session and check against it. This would be much easier than using a db. ~ Chocopi how would i do that? thanks in advance, chris Link to comment https://forums.phpfreaks.com/topic/65461-posting-message-question/#findComment-327040 Share on other sites More sharing options...
chocopi Posted August 17, 2007 Share Posted August 17, 2007 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 Link to comment https://forums.phpfreaks.com/topic/65461-posting-message-question/#findComment-327071 Share on other sites More sharing options...
chris_rulez001 Posted August 17, 2007 Author Share Posted August 17, 2007 ok thanks for your help Link to comment https://forums.phpfreaks.com/topic/65461-posting-message-question/#findComment-327089 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.