Jump to content

Recommended Posts

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.

 

Link to comment
https://forums.phpfreaks.com/topic/150763-how-to-block-contact-us-flood/
Share on other sites

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.

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.