I have a contact is form on my webite. https://www.selvastudios.com/contact.info.php
Typically I RARELY get a message from anyone. Lately I am getting a message every few days that is scrambled and likely robo-generated. Could my page be hacked or need updating to new php coding? What do I need to do??!
Here is the message I received this morning. Note the nonsensical responses to the fields...
[moderator note: made email addresses unrecognisable to fool email harvesters]
Copy link to clipboard
I's probably not a hack, just a more sophisticated spam bot encountering a relatively lackluster "human test".
It's pretty unlikely that there's anything to worry about.
yes it looks like a bot... so to protect from it, you will have to use a human action needed.
captcha is one of them, https://en.wikipedia.org/wiki/CAPTCHA but today most of the bot knows how to workaround it...
you can also place a honey pot for bots https://www.thryv.com/blog/honeypot-technique/
You can also work on a technique that consists in asking a question related to a picture that proposes a mathematical operation to solve, or any other type of question that links a visual and a logic.
In any case, there is no perfect and infallible solution.
Your test is easy enough to circumvent, the same logic in the form of an image is already more complex to circumvent.
Do you check for the correct answer on the server?
Maybe choose random numbers to give a different answer each time
I use a hidden field that bots tend to populate. On the server, I reject ny posts with a populated hidden field.
Another trick is to ask a question that only a human can answer like "What is the color of red wine?" Or "Who is burried in Grant's Tomb?"
Program your PHP script to reject incorrect answers and abort form processing. This works for robot submissions but unfortunately there's nothing much you can do about human spammers.