cgchris99 Posted March 23, 2009 Share Posted March 23, 2009 I have a site that deals with Clubs and there is contact info on there so the members are allowed to contact the club and it gets email through our system. I want to be able to keep the clubs from getting spammed. For example, the same person contacts ClubA, ClubB, ClubC, ClubD etc. What is the best way to handle this? Do I create session to block this? Thanks for any advice. Quote Link to comment https://forums.phpfreaks.com/topic/150763-how-to-block-contact-us-flood/ Share on other sites More sharing options...
revraz Posted March 23, 2009 Share Posted March 23, 2009 Why can't they contact all the clubs? Quote Link to comment https://forums.phpfreaks.com/topic/150763-how-to-block-contact-us-flood/#findComment-792070 Share on other sites More sharing options...
Maq Posted March 23, 2009 Share Posted March 23, 2009 If they are bots implement or create a CAPTCHA. But it seems like it is a human? Just store their username or IP in the database and make sure they only send either a certain amount or you could use sessions... Quote Link to comment https://forums.phpfreaks.com/topic/150763-how-to-block-contact-us-flood/#findComment-792071 Share on other sites More sharing options...
cgchris99 Posted March 23, 2009 Author Share Posted March 23, 2009 It's not bots that are the problem. It is vendors trying to sell their products to the clubs or other websites promoting their own website. So one person gets on the site and contacts 50 clubs sending the same message to each one club. We have a notice that the page that it is not to be used for commercial purposes but you can see how well that works. I would like to allow them to send two messages in a 24 hour period. Quote Link to comment https://forums.phpfreaks.com/topic/150763-how-to-block-contact-us-flood/#findComment-792199 Share on other sites More sharing options...
Maq Posted March 24, 2009 Share Posted March 24, 2009 You can use a combination of cookies and sessions. Cookies would work, but the vendor can delete them if they know that's how your preventing them from spamming but sessions they can just close the browser and reopen your page to continue spamming. My suggestion would be to log their IP in a table somewhere with a timestamp, so you can count how many messages they've sent, and you could write a script and call it in the crontab every 24 hours to wipe out the ones that are over 24 hours old. Quote Link to comment https://forums.phpfreaks.com/topic/150763-how-to-block-contact-us-flood/#findComment-792273 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.