How can I stop spam on my special forum / blog?

So, I have a custom forum and blog system that has been dealing with a lot of spam lately. If it were Wordpress, I would use Akismet, if it was another common platform, Iโ€™m sure I will find a plugin. Is there any static class that I can load to do this? I am using PHP.

+5
source share
8 answers

I will still go with Akismet if you like it. For use outside of WordPress, you may need to pay a fee for it, depending on your use - check the terms and conditions - but this is definitely an option and it's easy to implement yourself in PHP using their API. You just use the API key from your Wordpress account. com for access.

Basically, you are capturing yourself, the PHP client library takes your imagination - I use the PHP5 library from Alex Potsides - I connect your key, and these are a few lines of code. Here's the bare bones of checking right from one of my live sites:

...
            if ($akismet)
            {
                $akismet->setCommentAuthor($name);
                $akismet->setCommentAuthorEmail($session->userinfo["email"]);
                $akismet->setCommentAuthorURL("");
                $akismet->setCommentContent($sentence);
                $akismet->setPermalink("");
                if($akismet->isCommentSpam())
                {
                    // store the comment but mark it as spam (in case of a mis-diagnosis)
                    $spam = true;
                    // ...
                }
...

You just stuff any fields you have, and Akismet does everything possible for you and returns yay or nay to you ...

+3

.

php, CMS

+2

Akismet - php: http://www.achingbrain.net/stuff/php/akismet

10 , , .

, -, : -)

+1

Yup, Akismet . Gmail .

+1

Akismet captcha . - . 90% :

<style type="text/css">
label#hidden_label {
    display:none;
}
</style>

<label id="hidden_label">Leave the following field blank:
    <input type="text" name="fauxfield">
</label>

fauxfield , . - .

, , .

+1

Captcha. , / . , .

Edit
, Akismet , .

0

>

" ", - . [ - ] [1], akismet .

0
source

All Articles