NAME

WWW::StopForumSpam - Perl extension for the StopForumSpam.com API

DESCRIPTION

StopForumSpam is a Anti Spam Database for free usage. Even though aimed towards preventing registration of spambots on a forum, this extension can be used for any type of website (e.g. blog) as well.

An API key is only needed for reporting a new case of spam registration.

SYNOPSIS

use WWW::StopForumSpam;

my $sfs = WWW::StopForumSpam->new(
    api_key => "",                  # optional
    timeout => 4,                   # cURL timeout in seconds, defaults to 4
    treshold => 65,                 # defaults to 65
);

# Returns 1 if spammer (caution: it will return 1 also on errors, this is to
# prevent mass spam registration due to services not working properly, you 
# should therefor always check logs)
$sfs->check(
    ip => "127.0.0.1",              # optional, recommended
    email => "test\@test.com",      # optional, recommended
    username => "Foobar",           # optional, not recommended
);

# Alternative api call via DNSBL. Does not support usernames.
# Unlike check() this will NOT return 1 on server fail. 
$sfs->dns_check(
    ip => "127.0.0.1",
    email => "test\@test.com",
);

# Requires the setting of "api_key" in the constructor
$sfs->report(
    username => "Foobar",           # required
    ip_addr => "127.0.0.1",         # required
    evidence => "",                 # optional (for example the forum-post)
    email => "test\@test.com",      # required
);
);

SEE ALSO

API keys and more detail on StopForumSpam are available at http://www.stopforumspam.com.

Github: https://github.com/lifeofguenter/p5-stopforumspam

Website: http://www.perlhipster.com/p5-stopforumspam

DNSBL: http://sfs.dnsbl.st

AUTHOR

Günter Grodotzki, <guenter@perlhipster.com>

COPYRIGHT AND LICENSE

Copyright (C) 2014 by Günter Grodotzki

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.