Adding recaptcha on contact page or block text in name?

Scorpion Ghost

Elite Member
Executive VIP
Jr. VIP
Joined
Mar 22, 2013
Messages
9,148
Reaction score
10,489
I have this old site that has a contact page, and someone keeps spamming it with the same message over and over again in every language. I remove the entire page for a month, it stops. I put it back, it continues. I don't know what the deal is, but it's annoying. I just use this site to have an account with a certain payment processor, it's not really a real site. But I do need to have my site working, so I can't just remove the contact page and leave it removed.

So I want to add a recaptcha on the page, or if it's easier add a block in the "Name" field for a certain part of the word. Because the guy always has the same text in the name:

MikeBlaBla
JohnBlaBla
MariaBlaBla

The "BlaBla" is always there...

---

The website is html+php+jquery. It's a very old site. It has these 2 files for the contact page:

contact-us.php

https://codefile.io/f/EmYijUFA5w
contactform.lib.php

https://codefile.io/f/IHm7ZVGwWm

Yeah, the second one has a lot of code. Sorry :p

So anyway, if anyone wants to check it out and it's an easy fix, I would appreciate the help. Even if I can just add like a blacklisted word in the "Name" field would do it.

Thanks
 
You could add just a question like "What is 2+2?" or "What's the capital of Spain?" instead of adding recaptcha and slowing your website.

You can try this.

There are just examples but i think you can get the idea.
 
You could add just a question like "What is 2+2?" or "What's the capital of Spain?" instead of adding recaptcha and slowing your website.

You can try this.

There are just examples but i think you can get the idea.

Yeah actually, that would work too.

But the problem is, how to add it to the code so that it works?

I mean, I would imagine it won't work if I just copy and paste this code in one or both of my files. It requires to put the right things in the right place, and I have no idea what goes where.
 
You could add just a question like "What is 2+2?" or "What's the capital of Spain?" instead of adding recaptcha and slowing your website.

You can try this.

There are just examples but i think you can get the idea.
This can easily be solved, better be using recaptcha
 
Okay guys, thank you for the hepl, but I figured something out, maybe.

I used Cloudflare and added a rule in Firewall to present a JS captcha every time that page is visited.

Now, I don't know exactly what Cloudflare checks for with this. For example, in one of my older Palemoon browsers the captcha just loads forever and never lets me do anything. But on my main up-to-date Firefox and Chrome it checks something and goes right through.

So, if the spam stops, sweet. If it doesn't stop, I'll try the "Managed Challenge" and "Interactive Challenge" options, and hopefully one of them will work.

I'll update this thread on whether it worked or not.

Fuck you spammer son of a bitch! :p
 
Forgot to mention Cloudflare but yes will probably solve your issue / slow down the spammer
 
Forgot to mention Cloudflare but yes will probably solve your issue / slow down the spammer

Yeah actually, I'm happy to report that it seems to have worked. Not a single spam message arrived since I added the Cloudflare captcha thing.

So we're good :)

you can add captcha plugin on that, so it can help

I can't on this site. It's not a wordpress site.
 
10 days later, not a single spam from the contact form.

Happy to report, 100% worked and solved. Sweet :)
 
Back
Top