php: only allow form POST from specified domain name -
I have a page that runs php scripts that subscribes to a user in the newsletter, when a form is posted . Now, I'm worried about spam, anyone can post on their page using a form.
Is there any way that I can use conditions in PHP to allow for incoming submissions from a certain domain? If the domain does not match, to resonate the error message and use the second.
I am just starting to start PHP, so I appreciate all the help that I can get.
Thank you.
The closest thing is that you can set a cookie that is restricted to your domain and then See that cookie at the end of the post.
Setkey ('checkmen', 'some', 3600, '/', 'www.yourdomain.com'); Then you can
if (isset ($ _ cookie ['checkmydomain'])) {// post process} Obviously this is still trivial for the defeat, but it will stop "simple" bots by depositing data
Comments
Post a Comment