{"id":472,"date":"2007-09-03T10:25:27","date_gmt":"2007-09-03T09:25:27","guid":{"rendered":"http:\/\/pete.nu\/blog\/2007\/09\/spam-proofing-my-contact-form-with-akismet\/"},"modified":"2007-09-03T15:54:36","modified_gmt":"2007-09-03T14:54:36","slug":"spam-proofing-my-contact-form-with-akismet","status":"publish","type":"post","link":"https:\/\/pete.nu\/blog\/2007\/09\/03\/spam-proofing-my-contact-form-with-akismet\/","title":{"rendered":"Spam-proofing my contact form with Akismet"},"content":{"rendered":"<p>For a while, I&#8217;ve used a <a href=\"http:\/\/pete.nu\/contact\/\">contact form<\/a> (written in PHP) instead of publishing my email address on this site, to thwart spammers. However, recently I&#8217;ve noticed an increasing number of spam messages being submitted through the contact form.<\/p>\n<p>My first thought was to add a drop-down box where the user can select what their query is regarding &#8211; the default selected option is &#8220;My desire to sell you discount pharmaceuticals&#8221; and any messages submitted with this option would not be sent. However, the spammers (or the scripts that they use) would generally submit the form with a random selection from this box, so the majority of spam was still coming through.<\/p>\n<p>I didn&#8217;t want to make the contact form difficult to use, so I looked into ways of filtering out spam using Akismet, the same application that protects the comments forms on this site (and a very good job it does, I might add).<\/p>\n<p>You will need to download <a href=\"http:\/\/www.miphp.net\/blog\/view\/php4_akismet_class\">akismet.class.php<\/a> and upload it to your web server. Rather than rewrite all the instructions here, I&#8217;ll point you to the <a href=\"http:\/\/miphp.net\/pages\/akismet_docs\">perfectly adequate documentation<\/a> that already exists.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For a while, I&#8217;ve used a contact form (written in PHP) instead of publishing my email address on this site, to thwart spammers. However, recently I&#8217;ve noticed an increasing number of spam messages being submitted through the contact form. My first thought was to add a drop-down box where the user can select what their [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,2],"tags":[],"class_list":["post-472","post","type-post","status-publish","format-standard","hentry","category-computing","category-titgig"],"_links":{"self":[{"href":"https:\/\/pete.nu\/blog\/wp-json\/wp\/v2\/posts\/472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pete.nu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pete.nu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pete.nu\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pete.nu\/blog\/wp-json\/wp\/v2\/comments?post=472"}],"version-history":[{"count":0,"href":"https:\/\/pete.nu\/blog\/wp-json\/wp\/v2\/posts\/472\/revisions"}],"wp:attachment":[{"href":"https:\/\/pete.nu\/blog\/wp-json\/wp\/v2\/media?parent=472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pete.nu\/blog\/wp-json\/wp\/v2\/categories?post=472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pete.nu\/blog\/wp-json\/wp\/v2\/tags?post=472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}